-
Notifications
You must be signed in to change notification settings - Fork 29
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
fix: Minor login improvements #322
Conversation
…ute them to sign in
<NextLink href="/reset-password"> | ||
<Button variant="link" size="sm"> |
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 don't think NextLink
is necessary anymore. I'm also not seeing it in the "pages" docs
<NextLink href="/reset-password"> | ||
<Button variant="link" size="sm"> | ||
<Link href="/reset-password"> | ||
<Button variant="link" size="sm" type="button"> |
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.
If the user hits enter on their keyboard, it redirected them to /reset-password
instead of signing in. The workaround is having type=button
attribute. This is necessary when there are multiple buttons in a form.
async function handleLogout() { | ||
signOut(); | ||
await router.replace('/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 caused a flash to /login
page and redirected the user back to /
Changes
/login
page after signing out./reset-password
when it should log you in.Checklist