mirror of
https://github.com/status-im/nimbus-gui.git
synced 2025-02-03 07:03:30 +00:00
fix: remove window width from stepper
This commit is contained in:
parent
66f051e7d4
commit
47ed76a0f2
@ -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) => {
|
||||
|
@ -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 />}
|
||||
|
Loading…
x
Reference in New Issue
Block a user