fix: clean code and errors
This commit is contained in:
parent
76931c81df
commit
6229830e70
|
@ -10,7 +10,7 @@ const meta = {
|
||||||
layout: 'centered',
|
layout: 'centered',
|
||||||
},
|
},
|
||||||
tags: ['autodocs'],
|
tags: ['autodocs'],
|
||||||
decorators: [withRouter()],
|
decorators: [withRouter],
|
||||||
} satisfies Meta<typeof LinkWithArrow>
|
} satisfies Meta<typeof LinkWithArrow>
|
||||||
|
|
||||||
export default meta
|
export default meta
|
||||||
|
|
|
@ -10,7 +10,7 @@ const meta = {
|
||||||
layout: 'centered',
|
layout: 'centered',
|
||||||
},
|
},
|
||||||
tags: ['autodocs'],
|
tags: ['autodocs'],
|
||||||
decorators: [withRouter()],
|
decorators: [withRouter],
|
||||||
} satisfies Meta<typeof Activation>
|
} satisfies Meta<typeof Activation>
|
||||||
|
|
||||||
export default meta
|
export default meta
|
||||||
|
|
|
@ -10,7 +10,7 @@ const meta = {
|
||||||
layout: 'centered',
|
layout: 'centered',
|
||||||
},
|
},
|
||||||
tags: ['autodocs'],
|
tags: ['autodocs'],
|
||||||
decorators: [withRouter()],
|
decorators: [withRouter],
|
||||||
} satisfies Meta<typeof ActivationCard>
|
} satisfies Meta<typeof ActivationCard>
|
||||||
|
|
||||||
export default meta
|
export default meta
|
||||||
|
|
|
@ -10,7 +10,7 @@ const meta = {
|
||||||
layout: 'centered',
|
layout: 'centered',
|
||||||
},
|
},
|
||||||
tags: ['autodocs'],
|
tags: ['autodocs'],
|
||||||
decorators: [withRouter()],
|
decorators: [withRouter],
|
||||||
} satisfies Meta<typeof ActivationSyncCard>
|
} satisfies Meta<typeof ActivationSyncCard>
|
||||||
|
|
||||||
export default meta
|
export default meta
|
||||||
|
|
|
@ -2,16 +2,7 @@ import type { Meta, StoryObj } from '@storybook/react'
|
||||||
import { withRouter } from 'storybook-addon-react-router-v6'
|
import { withRouter } from 'storybook-addon-react-router-v6'
|
||||||
|
|
||||||
import ValidatorOnboarding from './ValidatorOnboarding'
|
import ValidatorOnboarding from './ValidatorOnboarding'
|
||||||
import { Provider as ReduxProvider } from 'react-redux'
|
|
||||||
import store from '../../redux/store'
|
|
||||||
|
|
||||||
const withRedux = (StoryComponent: any) => {
|
|
||||||
return (
|
|
||||||
<ReduxProvider store={store} >
|
|
||||||
<StoryComponent />
|
|
||||||
</ReduxProvider>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
const meta = {
|
const meta = {
|
||||||
title: 'Pages/ValidatorOnboarding',
|
title: 'Pages/ValidatorOnboarding',
|
||||||
component: ValidatorOnboarding,
|
component: ValidatorOnboarding,
|
||||||
|
@ -19,7 +10,7 @@ const meta = {
|
||||||
layout: 'centered',
|
layout: 'centered',
|
||||||
},
|
},
|
||||||
tags: ['autodocs'],
|
tags: ['autodocs'],
|
||||||
decorators: [withRouter(), withRedux],
|
decorators: [withRouter],
|
||||||
} satisfies Meta<typeof ValidatorOnboarding>
|
} satisfies Meta<typeof ValidatorOnboarding>
|
||||||
|
|
||||||
export default meta
|
export default meta
|
||||||
|
|
|
@ -1,19 +1,20 @@
|
||||||
import { Stack, YStack } from 'tamagui'
|
import { Stack, YStack } from 'tamagui'
|
||||||
|
import { useNavigate } from 'react-router-dom'
|
||||||
|
import { useState } from 'react'
|
||||||
|
import { Button } from '@status-im/components'
|
||||||
|
|
||||||
import FormStepper from './FormStepper/FormStepper'
|
import FormStepper from './FormStepper/FormStepper'
|
||||||
import Titles from '../../components/General/Titles'
|
import Titles from '../../components/General/Titles'
|
||||||
import { useState } from 'react'
|
|
||||||
import Overview from './Overview/Overview'
|
import Overview from './Overview/Overview'
|
||||||
import KeyGeneration from './KeyGeneration/KeyGeneration'
|
import KeyGeneration from './KeyGeneration/KeyGeneration'
|
||||||
import Activation from './Activation/Activation'
|
import Activation from './Activation/Activation'
|
||||||
import './layoutGradient.css'
|
|
||||||
import ValidatorBoxWrapper from './ValidatorBoxWrapper/ValidatorBoxWrapper'
|
import ValidatorBoxWrapper from './ValidatorBoxWrapper/ValidatorBoxWrapper'
|
||||||
import { Button } from '@status-im/components'
|
|
||||||
import { useNavigate } from 'react-router-dom'
|
|
||||||
import ClientSetup from './ClientSetup/ClientSetup'
|
import ClientSetup from './ClientSetup/ClientSetup'
|
||||||
import ConsensusSelection from './ValidatorSetup/ConsensusSelection'
|
import ConsensusSelection from './ValidatorSetup/ConsensusSelection'
|
||||||
import Advisories from './Advisories/Advisories'
|
import Advisories from './Advisories/Advisories'
|
||||||
import ValidatorSetup from './ValidatorSetup/ValidatorSetup'
|
import ValidatorSetup from './ValidatorSetup/ValidatorSetup'
|
||||||
import ValidatorSetupInstall from './ValidatorSetup/ValidatorInstall'
|
import ValidatorSetupInstall from './ValidatorSetup/ValidatorInstall'
|
||||||
|
import './layoutGradient.css'
|
||||||
|
|
||||||
const ValidatorOnboarding = () => {
|
const ValidatorOnboarding = () => {
|
||||||
const [activeStep, setActiveStep] = useState(0)
|
const [activeStep, setActiveStep] = useState(0)
|
||||||
|
@ -66,7 +67,7 @@ const ValidatorOnboarding = () => {
|
||||||
{activeStep === 3 && subStepValidatorSetup === 0 && <ValidatorSetup />}
|
{activeStep === 3 && subStepValidatorSetup === 0 && <ValidatorSetup />}
|
||||||
{activeStep === 3 && subStepValidatorSetup === 1 && <ValidatorSetupInstall />}
|
{activeStep === 3 && subStepValidatorSetup === 1 && <ValidatorSetupInstall />}
|
||||||
{activeStep === 3 && subStepValidatorSetup === 2 && <ConsensusSelection />}
|
{activeStep === 3 && subStepValidatorSetup === 2 && <ConsensusSelection />}
|
||||||
|
|
||||||
{activeStep === 4 && <KeyGeneration isConfirmPhraseStage={isConfirmPhraseStage} />}
|
{activeStep === 4 && <KeyGeneration isConfirmPhraseStage={isConfirmPhraseStage} />}
|
||||||
{activeStep === 5 && <Activation />}
|
{activeStep === 5 && <Activation />}
|
||||||
</ValidatorBoxWrapper>
|
</ValidatorBoxWrapper>
|
||||||
|
|
|
@ -8,6 +8,14 @@ import ConsensusClientCard from './ConsensusClientCard'
|
||||||
import LinkWithArrow from '../../../components/General/LinkWithArrow'
|
import LinkWithArrow from '../../../components/General/LinkWithArrow'
|
||||||
import { RootState } from '../../../redux/store'
|
import { RootState } from '../../../redux/store'
|
||||||
|
|
||||||
|
const clientIcons = {
|
||||||
|
Nethermind: '/icons/nethermind-circle.png',
|
||||||
|
Besu: '/icons/hyperledger-besu-circle.png',
|
||||||
|
Geth: '/icons/gethereum-mascot-circle.png',
|
||||||
|
Erigon: '/icons/erigon-circle.png',
|
||||||
|
Nimbus: '/icons/NimbusDisabled.svg',
|
||||||
|
}
|
||||||
|
|
||||||
const ConsensusSelection = () => {
|
const ConsensusSelection = () => {
|
||||||
const selectedClient = useSelector((state: RootState) => state.execClient.selectedClient) as
|
const selectedClient = useSelector((state: RootState) => state.execClient.selectedClient) as
|
||||||
| 'Nethermind'
|
| 'Nethermind'
|
||||||
|
@ -16,14 +24,6 @@ const ConsensusSelection = () => {
|
||||||
| 'Erigon'
|
| 'Erigon'
|
||||||
| 'Nimbus'
|
| 'Nimbus'
|
||||||
|
|
||||||
const clientIcons = {
|
|
||||||
Nethermind: '/icons/nethermind-circle.png',
|
|
||||||
Besu: '/icons/hyperledger-besu-circle.png',
|
|
||||||
Geth: '/icons/gethereum-mascot-circle.png',
|
|
||||||
Erigon: '/icons/erigon-circle.png',
|
|
||||||
Nimbus: '/icons/NimbusDisabled.svg',
|
|
||||||
}
|
|
||||||
|
|
||||||
const clients = [
|
const clients = [
|
||||||
{
|
{
|
||||||
name: selectedClient,
|
name: selectedClient,
|
||||||
|
|
|
@ -15,7 +15,6 @@ const PairedDeviceCard = () => {
|
||||||
>
|
>
|
||||||
<XStack space={'$3'} alignItems={'center'}>
|
<XStack space={'$3'} alignItems={'center'}>
|
||||||
<Avatar backgroundColor="pink" size={32} type="user" name="RP" />
|
<Avatar backgroundColor="pink" size={32} type="user" name="RP" />
|
||||||
|
|
||||||
<YStack>
|
<YStack>
|
||||||
<Text size={13} color="#647084">
|
<Text size={13} color="#647084">
|
||||||
Paired Device
|
Paired Device
|
||||||
|
|
|
@ -1,17 +1,6 @@
|
||||||
import type { Meta, StoryObj } from '@storybook/react'
|
import type { Meta, StoryObj } from '@storybook/react'
|
||||||
import { Provider as ReduxProvider } from 'react-redux'
|
|
||||||
import { withRouter } from 'storybook-addon-react-router-v6'
|
import { withRouter } from 'storybook-addon-react-router-v6'
|
||||||
import React from 'react'
|
|
||||||
import ValidatorSetup from './ValidatorSetup'
|
import ValidatorSetup from './ValidatorSetup'
|
||||||
import store from '../../../redux/store'
|
|
||||||
|
|
||||||
const withRedux = (StoryComponent: any) => {
|
|
||||||
return (
|
|
||||||
<ReduxProvider store={store} >
|
|
||||||
<StoryComponent />
|
|
||||||
</ReduxProvider>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
const meta = {
|
const meta = {
|
||||||
title: 'ValidatorOnboarding/ValidatorSetup',
|
title: 'ValidatorOnboarding/ValidatorSetup',
|
||||||
|
@ -20,7 +9,7 @@ const meta = {
|
||||||
layout: 'centered',
|
layout: 'centered',
|
||||||
},
|
},
|
||||||
tags: ['autodocs'],
|
tags: ['autodocs'],
|
||||||
decorators: [withRouter(), withRedux],
|
decorators: [withRouter],
|
||||||
} satisfies Meta<typeof ValidatorSetup>
|
} satisfies Meta<typeof ValidatorSetup>
|
||||||
|
|
||||||
export default meta
|
export default meta
|
||||||
|
|
Loading…
Reference in New Issue