-
Notifications
You must be signed in to change notification settings - Fork 1
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
WIP: Add internal employee login page based on hi-fi designs #15
Conversation
This PR is being deployed to Railway 🚅 |
pages/login.tsx
Outdated
</Flex> | ||
|
||
{/* If NextAuth's callback doesn't contain a URL, auth (sending email) wasn't successful. */} | ||
{!authState?.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.
I was reading up on the nextAuth docs and was just curious - why did you use authState.url
and not authState.ok
here?
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.
authState.ok
will always contain 200
(the HTTP code) if the user's login request is succesfully received by the NextAuth client, regardless of whether or not the user has a valid email. We need to check for url
instead since it only gets returned when an actual login email gets sent out.
55c0d2c
to
130a62f
Compare
@@ -18,9 +18,9 @@ export default function Layout({ children, header = true, footer = true }: Props | |||
<Meta /> | |||
<Flex flexDirection="column" alignItems="center" minHeight="100vh"> | |||
{header && <Header />} | |||
<Box flexGrow={1} paddingTop={20}> | |||
<Flex flexGrow={1} width="100%" justifyContent="center"> |
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.
For reference: Grid was not spanning 100% width. This was a necessary fix.
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.
LGTM
Notion ticket link
Build hi-fi login pages + logout button
Implementation description
DONE
WIP
Notes
Checklist
[Feature]
,[Improvement]
or[Fix]
,