From 3c6c3c32957f506f1a095b9ee997a705488d5df9 Mon Sep 17 00:00:00 2001 From: RadoslavDimchev Date: Thu, 18 Jan 2024 23:50:27 +0200 Subject: [PATCH] fix: filter visible steps immediately --- src/pages/ValidatorOnboarding/FormStepper/FormStepper.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/pages/ValidatorOnboarding/FormStepper/FormStepper.tsx b/src/pages/ValidatorOnboarding/FormStepper/FormStepper.tsx index 6385f44f..e8226140 100644 --- a/src/pages/ValidatorOnboarding/FormStepper/FormStepper.tsx +++ b/src/pages/ValidatorOnboarding/FormStepper/FormStepper.tsx @@ -40,8 +40,6 @@ const FormStepper = ({ activeStep }: FormStepperProps) => { } } - const visibleSteps = FORM_STEPS.filter((_, index) => isStepVisible(index)) - return ( { marginBottom: '3rem', }} > - {visibleSteps.map(step => { + {FORM_STEPS.filter((_, index) => isStepVisible(index)).map(step => { const originalIndex = FORM_STEPS.indexOf(step) return (