Skip to content
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

Merged
merged 7 commits into from
Sep 8, 2022
Merged

Conversation

mxyng
Copy link
Collaborator

@mxyng mxyng commented Sep 6, 2022

Summary

Set submitted state as soon as the submit button is pressed rather than after the request returns.

Also some minor UI issues like

  • punctuation
  • divider on password reset
  • margin between forgot password and login button

Resolves #3114

@@ -13,6 +13,7 @@ export default function PasswordReset() {
const [submitted, setSubmitted] = useState(false)

async function onSubmit(e) {
setSubmitted(true)
Copy link
Collaborator

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.

Copy link
Collaborator Author

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

@mxyng mxyng merged commit 197b382 into main Sep 8, 2022
@mxyng mxyng deleted the mxyng/minor-ui-fixes branch September 8, 2022 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Password reset button can be clicked multiple times producing multiple emails
3 participants