Skip to content

Commit bbf3111

Browse files
committed
fix(ui): Reset form submitting state after successful project creation (#94)
Fixes the bug where creating a project would return to the create project page instead of navigating to the dashboard. The ProjectCreationForm component was not resetting isSubmitting state to false in the success path, leaving the form in a loading state with disabled inputs. This interfered with Next.js router navigation. Now properly resets isSubmitting after calling onSuccess(), allowing the component to unmount cleanly during navigation to the project dashboard. Closes #94
1 parent 81b855b commit bbf3111

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

web-ui/src/components/ProjectCreationForm.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,9 @@ const ProjectCreationForm: React.FC<ProjectCreationFormProps> = ({
9696

9797
// US3: Call parent onSuccess callback with project ID
9898
onSuccess(response.data.id);
99+
100+
// Reset submitting state to allow clean unmount during navigation
101+
setIsSubmitting(false);
99102
// eslint-disable-next-line @typescript-eslint/no-explicit-any
100103
} catch (error: any) {
101104
setIsSubmitting(false);

0 commit comments

Comments
 (0)