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 = {
|
type FormStepperProps = {
|
||||||
activeStep: number
|
activeStep: number
|
||||||
windowWidth: number
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const FormStepper = ({ activeStep, windowWidth }: FormStepperProps) => {
|
const FormStepper = ({ activeStep }: FormStepperProps) => {
|
||||||
const dispatch = useDispatch()
|
const dispatch = useDispatch()
|
||||||
|
|
||||||
const isStepVisible = (index: number) => {
|
const isStepVisible = (index: number) => {
|
||||||
if (windowWidth < 740) {
|
// if (windowWidth < 1025) {
|
||||||
const start = Math.max(0, activeStep - 1)
|
// const start = activeStep - 1
|
||||||
const end = Math.min(FORM_STEPS.length - 1, activeStep + 1)
|
// const end = Math.min(FORM_STEPS.length - 1, activeStep + 1)
|
||||||
return index >= start && index <= end
|
// return index >= start && index <= end
|
||||||
} else {
|
// } else {
|
||||||
return true
|
return true
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
const changeStepOnClickHandler = (index: number) => {
|
const changeStepOnClickHandler = (index: number) => {
|
||||||
|
@ -54,7 +54,7 @@ const ValidatorOnboarding = () => {
|
|||||||
titleSize={19}
|
titleSize={19}
|
||||||
subtitle="Earn Rewards for securing the Ethereum Network"
|
subtitle="Earn Rewards for securing the Ethereum Network"
|
||||||
/>
|
/>
|
||||||
<FormStepper activeStep={activeStep} windowWidth={windowWidth} />
|
<FormStepper activeStep={activeStep} />
|
||||||
<ValidatorBoxWrapper>
|
<ValidatorBoxWrapper>
|
||||||
{activeStep === 0 && <Overview />}
|
{activeStep === 0 && <Overview />}
|
||||||
{activeStep === 1 && <Advisories />}
|
{activeStep === 1 && <Advisories />}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user