fix: use finally block to always reset creating state in handleCreate#1244
fix: use finally block to always reset creating state in handleCreate#1244akhilmodi29 wants to merge 2 commits into
Conversation
|
@akhilmodi29 is attempting to deploy a commit to the PRIYANSHU DOSHI's projects Team on Vercel. A member of the Team first needs to authorize it. |
GSSoC Label Checklist 🏷️@Priyanshu-byte-coder — please apply the appropriate labels before merging: Difficulty (pick one):
Quality (optional):
Validation (required to score):
|
There was a problem hiding this comment.
Thanks for your first PR on DevTrack! 🎉
A maintainer will review it within 48 hours. While you wait:
- Make sure CI is passing (type-check + lint)
- Double-check the PR description is filled out and the issue is linked
- Feel free to ask questions in Discussions if you need help
If you find DevTrack useful, a ⭐ star on the repo is always appreciated — it helps the project grow and attract more contributors!
|
@Priyanshu-byte-coder can you please review and apply the appropriate labels? Suggested labels: Difficulty:
Quality:
Type:
Validation:
|
What does this PR fix?
Closes #1243
The "Add goal" submit button in the Goal Tracker widget gets permanently
stuck in a disabled "Creating..." state if the post-create sync or
reload throws an error.
Root Cause
setCreating(false)was only called at the end of the success path.Any error after a successful POST meant it never ran.
Changes Made
tryblock (only runs on success)setCreating(false)fromcatchblockfinally { setCreating(false) }— button always re-enablesFiles Changed
src/components/GoalTracker.tsxTesting Done