fix: remove window width from stepper

This commit is contained in:
RadoslavDimchev 2024-01-18 18:55:50 +02:00
parent 66f051e7d4
commit 47ed76a0f2
2 changed files with 10 additions and 10 deletions

View File

@ -7,19 +7,19 @@ import './FormStepper.css'
type FormStepperProps = {
activeStep: number
windowWidth: number
}
const FormStepper = ({ activeStep, windowWidth }: FormStepperProps) => {
const FormStepper = ({ activeStep }: FormStepperProps) => {
const dispatch = useDispatch()
const isStepVisible = (index: number) => {
if (windowWidth < 740) {
const start = Math.max(0, activeStep - 1)
const end = Math.min(FORM_STEPS.length - 1, activeStep + 1)
return index >= start && index <= end
} else {
return true
}
// if (windowWidth < 1025) {
// const start = activeStep - 1
// const end = Math.min(FORM_STEPS.length - 1, activeStep + 1)
// return index >= start && index <= end
// } else {
return true
// }
}
const changeStepOnClickHandler = (index: number) => {

View File

@ -54,7 +54,7 @@ const ValidatorOnboarding = () => {
titleSize={19}
subtitle="Earn Rewards for securing the Ethereum Network"
/>
<FormStepper activeStep={activeStep} windowWidth={windowWidth} />
<FormStepper activeStep={activeStep} />
<ValidatorBoxWrapper>
{activeStep === 0 && <Overview />}
{activeStep === 1 && <Advisories />}