Skip to content

Commit

Permalink
🐛 Don't allow save as draft on first page of wizard
Browse files Browse the repository at this point in the history
  • Loading branch information
ibolton336 committed Oct 11, 2023
1 parent 050e3c7 commit 281ed72
Showing 1 changed file with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,16 @@ export const CustomWizardFooter: React.FC<CustomWizardFooterProps> = ({
<Button variant="link" onClick={onClose} cy-data="cancel">
{t("actions.cancel")}
</Button>
<Button
variant="link"
onClick={onSaveAsDraft}
isDisabled={isFormInvalid || isFirstStep || !hasAnswers}
cy-data="save-as-draft"
>
{t("actions.saveAsDraft")}
</Button>
{!isFirstStep && (
<Button
variant="link"
onClick={onSaveAsDraft}
isDisabled={isFormInvalid || isFirstStep || !hasAnswers}
cy-data="save-as-draft"
>
{t("actions.saveAsDraft")}
</Button>
)}
</>
);
}}
Expand Down

0 comments on commit 281ed72

Please sign in to comment.