mirror of
https://github.com/status-im/nimbus-gui.git
synced 2025-02-09 10:03:36 +00:00
feat: add components and state to the client setup
This commit is contained in:
parent
be0e13aebd
commit
cf6aa02f8d
@ -1,13 +1,34 @@
|
|||||||
|
import { useState } from 'react'
|
||||||
import { Separator, YStack } from 'tamagui'
|
import { Separator, YStack } from 'tamagui'
|
||||||
|
import { Text } from '@status-im/components'
|
||||||
|
|
||||||
import SetupRow from './SetupRow'
|
|
||||||
import WithdrawalAddress from './WithdrawalAddress'
|
import WithdrawalAddress from './WithdrawalAddress'
|
||||||
import LinkWithArrow from '../../../components/General/LinkWithArrow'
|
import LinkWithArrow from '../../../components/General/LinkWithArrow'
|
||||||
|
import ValidatorsMenuWithPrice from '../../../components/General/ValidatorsMenuWithPrice'
|
||||||
|
import { CLIENT_SETUP_SUBTITLE } from '../../../constants'
|
||||||
|
|
||||||
const ClientSetup = () => {
|
const ClientSetup = () => {
|
||||||
|
const [validatorCount, setValidatorCount] = useState(0)
|
||||||
|
|
||||||
|
const changeValidatorCountHandler = (value: string) => {
|
||||||
|
const numberValue = Number(value)
|
||||||
|
if (!isNaN(numberValue)) {
|
||||||
|
setValidatorCount(numberValue)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<YStack space={'$8'} padding={'26px'} width={'100%'} minHeight={'65vh'}>
|
<YStack space={'$6'} padding={'26px'} width={'100%'} minHeight={'65vh'}>
|
||||||
<SetupRow title={'Setup up Validators'} />
|
<YStack space={'$4'}>
|
||||||
|
<Text size={19} weight={'semibold'}>
|
||||||
|
Setup up Validators
|
||||||
|
</Text>
|
||||||
|
<ValidatorsMenuWithPrice
|
||||||
|
validatorCount={validatorCount}
|
||||||
|
changeValidatorCountHandler={changeValidatorCountHandler}
|
||||||
|
label={CLIENT_SETUP_SUBTITLE}
|
||||||
|
/>
|
||||||
|
</YStack>
|
||||||
<Separator borderColor={'#F0F2F5'} />
|
<Separator borderColor={'#F0F2F5'} />
|
||||||
<WithdrawalAddress title={'Withdrawal address'} />
|
<WithdrawalAddress title={'Withdrawal address'} />
|
||||||
<LinkWithArrow
|
<LinkWithArrow
|
||||||
@ -19,4 +40,5 @@ const ClientSetup = () => {
|
|||||||
</YStack>
|
</YStack>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export default ClientSetup
|
export default ClientSetup
|
||||||
|
Loading…
x
Reference in New Issue
Block a user