feat: add logic to continue for the last step

This commit is contained in:
RadoslavDimchev 2023-08-25 10:25:26 +03:00
parent 0b51bd6535
commit 260f23c714
1 changed files with 13 additions and 1 deletions

View File

@ -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 (
<div className="gradient-wrapper">
<YStack
@ -43,7 +53,9 @@ const ValidatorOnboarding = () => {
{activeStep === 4 && <Activation />}
</ValidatorBoxWrapper>
<Stack style={{ alignItems: 'end', width: '100%', marginTop: '16px', zIndex: 999 }}>
<Button>Continue</Button>
<Button onPress={continueHandler}>
{activeStep < 4 ? 'Continue' : 'Continue to Dashboard'}
</Button>
</Stack>
</YStack>
</div>