fix: filter visible steps immediately

This commit is contained in:
RadoslavDimchev 2024-01-18 23:50:27 +02:00
parent 59d93b8748
commit 3c6c3c3295
1 changed files with 1 additions and 3 deletions

View File

@ -40,8 +40,6 @@ const FormStepper = ({ activeStep }: FormStepperProps) => {
}
}
const visibleSteps = FORM_STEPS.filter((_, index) => isStepVisible(index))
return (
<Stepper
activeStep={activeStep}
@ -57,7 +55,7 @@ const FormStepper = ({ activeStep }: FormStepperProps) => {
marginBottom: '3rem',
}}
>
{visibleSteps.map(step => {
{FORM_STEPS.filter((_, index) => isStepVisible(index)).map(step => {
const originalIndex = FORM_STEPS.indexOf(step)
return (
<Step