From 260f23c714961d7003ba0c165e67a029b023099e Mon Sep 17 00:00:00 2001 From: RadoslavDimchev Date: Fri, 25 Aug 2023 10:25:26 +0300 Subject: [PATCH] feat: add logic to continue for the last step --- .../ValidatorOnboarding/ValidatorOnboarding.tsx | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/pages/ValidatorOnboarding/ValidatorOnboarding.tsx b/src/pages/ValidatorOnboarding/ValidatorOnboarding.tsx index 2d09761e..21b6e7b2 100644 --- a/src/pages/ValidatorOnboarding/ValidatorOnboarding.tsx +++ b/src/pages/ValidatorOnboarding/ValidatorOnboarding.tsx @@ -10,14 +10,24 @@ import Activation from './Activation/Activation' import './layoutGradient.css' import ValidatorBoxWrapper from './ValidatorBoxWrapper/ValidatorBoxWrapper' import { Button } from '@status-im/components' +import { useNavigate } from 'react-router-dom' const ValidatorOnboarding = () => { const [activeStep, setActiveStep] = useState(0) + const navigate = useNavigate() const changeActiveStep = (step: number) => { setActiveStep(step) } + const continueHandler = () => { + if (activeStep < 4) { + setActiveStep(activeStep + 1) + } else { + navigate('/') + } + } + return (
{ {activeStep === 4 && } - +