fix: filter visible steps immediately
This commit is contained in:
parent
59d93b8748
commit
3c6c3c3295
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue