-
Notifications
You must be signed in to change notification settings - Fork 56
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: password reset sending multiple requests #3139
Conversation
492e941
to
00ef53e
Compare
00ef53e
to
7622026
Compare
@@ -13,6 +13,7 @@ export default function PasswordReset() { | |||
const [submitted, setSubmitted] = useState(false) | |||
|
|||
async function onSubmit(e) { | |||
setSubmitted(true) |
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.
You may want to set this back to false on error so the user can try again.
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.
Good call out though but the UI doesn't currently branch on errors. The error state is never set to a non-empty value so I've removed it
7622026
to
a74b569
Compare
a74b569
to
fbc1e44
Compare
Summary
Set
submitted
state as soon as the submit button is pressed rather than after the request returns.Also some minor UI issues like
Resolves #3114