Skip to content

Disable Next while submitting on step 4#4735

Merged
vinaypanduga merged 1 commit into
mainfrom
Hkp-main-july
Jul 16, 2026
Merged

Disable Next while submitting on step 4#4735
vinaypanduga merged 1 commit into
mainfrom
Hkp-main-july

Conversation

@harshitha-kp07

Copy link
Copy Markdown
Collaborator

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)

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)
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines 34 to +39
? !isFormValid || isSubmitting
: activeStep === 1
? !isAssignmentComplete
: false;
: activeStep === 4
? isSubmitting
: false;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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;

@vinaypanduga
vinaypanduga merged commit 52a49a0 into main Jul 16, 2026
1 check passed
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.

2 participants