Skip to content

Commit

Permalink
improvement(existing-account-display): Disable inputs during user dat…
Browse files Browse the repository at this point in the history
…a update submission.
  • Loading branch information
binh-dam-ibigroup committed Oct 16, 2023
1 parent 15cd0be commit 760539b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/components/user/existing-account-display.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@ const ExistingAccountDisplay = (parentProps: Props) => {
// Apply changes and submit the form right away to update the user profile.
handleChange(e)
try {
// Disable input during submission
e.target.disabled = true
await submitForm()
// Re-enable input during submission
e.target.disabled = false
// Display a toast notification on success.
toastSuccess(
intl.formatMessage({
Expand Down

0 comments on commit 760539b

Please sign in to comment.