Disable Next while submitting on step 4#4735
Conversation
Update CampaignSetupActions disableNext logic to handle activeStep === 4. Previously other steps defaulted to false, which allowed advancing during submission on step 4. Now disableNext uses isSubmitting for step 4 to prevent duplicate submits. (File: src/ops-console/components/campaignSetup/CampaignSetupActions.tsx)
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
There was a problem hiding this comment.
Code Review
This pull request updates the CampaignSetupActions component to disable the next action button when submitting during step 4. The reviewer suggested simplifying the nested ternary logic by applying the isSubmitting check as a general fallback condition, which improves readability and ensures the button is consistently disabled during submissions across all steps.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| ? !isFormValid || isSubmitting | ||
| : activeStep === 1 | ||
| ? !isAssignmentComplete | ||
| : false; | ||
| : activeStep === 4 | ||
| ? isSubmitting | ||
| : false; |
There was a problem hiding this comment.
Instead of adding another level of nested ternary operators to handle activeStep === 4, we can simplify the logic and make it more robust. By applying isSubmitting as a fallback or general condition, we ensure that the primary action button is disabled during submission across all steps, while also keeping the code cleaner and easier to read.
? !isFormValid || isSubmitting
: (activeStep === 1
? !isAssignmentComplete
: false) || isSubmitting;
Update CampaignSetupActions disableNext logic to handle activeStep === 4. Previously other steps defaulted to false, which allowed advancing during submission on step 4. Now disableNext uses isSubmitting for step 4 to prevent duplicate submits. (File: src/ops-console/components/campaignSetup/CampaignSetupActions.tsx)