Skip to content

Conversation

rohilsurana
Copy link
Member

@rohilsurana rohilsurana commented Sep 9, 2025

Summary

  • Added early return check in onSubmit to prevent duplicate form submissions
  • Synchronized submit logic with button disabled state (isLoading || isSubmitting)
  • Fixes duplicate success notifications when rapidly clicking submit button

Test Plan

  • Rapidly click the Update button on user profile form
  • Verify only one success notification appears
  • Verify only one API call is made
  • Test that button remains disabled during submission

@rohilsurana rohilsurana requested a review from rsbh September 9, 2025 09:23
Copy link

vercel bot commented Sep 9, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
frontier Ready Ready Preview Comment Sep 9, 2025 10:56am

@coveralls
Copy link

coveralls commented Sep 9, 2025

Pull Request Test Coverage Report for Build 17580332480

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 31.79%

Totals Coverage Status
Change from base Build 17573666038: 0.0%
Covered Lines: 10728
Relevant Lines: 33746

💛 - Coveralls

@rohilsurana rohilsurana force-pushed the feature/cld-2216-duplicate-success-notifications-after-multiple-submit-button branch from 3ab8db5 to 58587be Compare September 9, 2025 09:53
@rohilsurana rohilsurana force-pushed the feature/cld-2216-duplicate-success-notifications-after-multiple-submit-button branch from 58587be to a2caffb Compare September 9, 2025 09:56
@rohilsurana rohilsurana force-pushed the feature/cld-2216-duplicate-success-notifications-after-multiple-submit-button branch from a2caffb to 5e44989 Compare September 9, 2025 10:03
@rohilsurana rohilsurana force-pushed the feature/cld-2216-duplicate-success-notifications-after-multiple-submit-button branch from 5e44989 to d95f78a Compare September 9, 2025 10:23
Use reset(..., { keepDirtyValues: true }) so local form changes aren’t lost when user context updates, preventing unexpected button disable states.
@rohilsurana rohilsurana merged commit 808e2de into main Sep 9, 2025
7 checks passed
@rohilsurana rohilsurana deleted the feature/cld-2216-duplicate-success-notifications-after-multiple-submit-button branch September 9, 2025 11:03
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.

3 participants