From b6fd80f04649c8d27d2f1f97b4f7f350b4d36554 Mon Sep 17 00:00:00 2001 From: deriv Date: Thu, 28 Dec 2023 12:09:19 +0300 Subject: [PATCH] fix: stepper bug --- .../components/wizard-component/wizard-footer.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/signup-affiliates/components/wizard-component/wizard-footer.tsx b/src/pages/signup-affiliates/components/wizard-component/wizard-footer.tsx index f732d441afe..6d46d718351 100644 --- a/src/pages/signup-affiliates/components/wizard-component/wizard-footer.tsx +++ b/src/pages/signup-affiliates/components/wizard-component/wizard-footer.tsx @@ -64,7 +64,7 @@ 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({ @@ -72,7 +72,7 @@ const WizardFooter = ({ step_num: step, step_codename: getCodeName(step), }) - step < max_step && setStep(step + 1) + step < max_step && setStep((prev) => prev + 1) } }, [max_step, setStep, step],