Skip to content

Commit

Permalink
Feat: Update Wizard Logic to Display Cancel Button and Info Copy (#1267)
Browse files Browse the repository at this point in the history
  • Loading branch information
erikataot authored Mar 18, 2024
1 parent 12b2812 commit 09a8140
Showing 1 changed file with 40 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export const CompanyAndUserInfoSteps = ({
return (
<>
<input type="hidden" {...register("legalName")} />
{activeStep === totalSteps - 2 && (
{activeStep <= totalSteps - 1 && (
<div className="create-profile-section create-profile-section--info">
<Alert severity="info">
<Typography>
Expand Down Expand Up @@ -204,22 +204,45 @@ export const CompanyAndUserInfoSteps = ({
)}
{activeStep === totalSteps - 1 && (
<>
<Button
onClick={handleBack}
variant="contained"
color="secondary"
startIcon={<FontAwesomeIcon icon={faArrowLeft} />}
className="proceed-btn proceed-btn--prev"
>
Previous
</Button>
<Button
onClick={handleCreateProfileSubmit(onClickFinish)}
variant="contained"
className="proceed-btn proceed-btn--finish"
>
Finish
</Button>
<Stack direction="row" spacing={3}>
<Button
key="cancel-create-profile-button"
aria-label="Cancel Create Profile"
variant="contained"
color="secondary"
onClick={() => {
// Go back
navigate(-1);
}}
disableElevation
sx={{
":hover": {
background: BC_COLOURS.bc_background_light_grey,
border: `2px solid ${BC_COLOURS.bc_text_box_border_grey}`,
},
border: `2px solid ${BC_COLOURS.white}`,
borderRadius: "4px",
}}
>
Cancel
</Button>
<Button
onClick={handleBack}
variant="contained"
color="secondary"
startIcon={<FontAwesomeIcon icon={faArrowLeft} />}
className="proceed-btn proceed-btn--prev"
>
Previous
</Button>
<Button
onClick={handleCreateProfileSubmit(onClickFinish)}
variant="contained"
className="proceed-btn proceed-btn--finish"
>
Finish
</Button>
</Stack>
</>
)}
</div>
Expand Down

0 comments on commit 09a8140

Please sign in to comment.