Skip to content
This repository has been archived by the owner on Sep 26, 2024. It is now read-only.

Commit

Permalink
fix: stepper bug
Browse files Browse the repository at this point in the history
  • Loading branch information
NikitK-deriv committed Dec 28, 2023
1 parent ed623a0 commit b6fd80f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,15 @@ const WizardFooter = ({
step_num: step,
step_codename: getCodeName(step),
})
step > 1 && setStep(step)
step > 1 && setStep((prev) => prev - 1)
}
if (button_type === ButtonType.Next) {
trackEvent({
action: 'step_passed',
step_num: step,
step_codename: getCodeName(step),
})
step < max_step && setStep(step + 1)
step < max_step && setStep((prev) => prev + 1)
}
},
[max_step, setStep, step],
Expand Down

0 comments on commit b6fd80f

Please sign in to comment.