-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Issue #2962] Login modal #3433
Conversation
if (!environment.AUTH_LOGIN_URL) { | ||
throw new Error("AUTH_LOGIN_URL not defined"); | ||
} | ||
return NextResponse.redirect(environment.AUTH_LOGIN_URL); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Returning NextResponse.redirect
instead of redirect
doesn't throw an error for the try/catch block.
} | ||
return NextResponse.redirect(environment.AUTH_LOGIN_URL); | ||
} catch (error) { | ||
return new NextResponse(error as string, { status: 500 }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if we should have a more graceful error message, but this is temporary anyway.
@@ -380,7 +380,7 @@ button.usa-pagination__button.usa-button { | |||
} | |||
|
|||
@include at-media("desktop") { | |||
.desktop\:margin-bottom-5px { | |||
margin-bottom: 5px !important; | |||
.desktop\:margin-bottom-3px { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3523540
to
0bf5664
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one request for a test but nothing blocking
✅ ✅ ✅ ✅ ✅
loginUrl={authLoginUrl || ""} | ||
/> | ||
)} | ||
{!user?.token && <LoginModal navLoginLinkText={t("nav_link_login")} />} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this works because the LoginModal component includes the modal control button but if you're expecting to see something like <LoginButton>
here, it's a little confusing to see <LoginModal>
instead. Something for later, but there's probably a refactor that would make this a little easier to understand
}), | ||
})); | ||
|
||
describe("LoginModal", () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we add a test that the login button directs to the correct location?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a constant now, so it would be just checking the link. Can add in a follow up
Summary
Fixes #2962
Time to review: 15 mins
Changes proposed
Mobile
Desktop
TODO