feat: create state for selected mechanism
This commit is contained in:
parent
a23f985e03
commit
340b5f7dd6
|
@ -4,12 +4,22 @@ import RecoveryMechanism from './RecoveryMechanism'
|
||||||
import { Button, InformationBox, Text } from '@status-im/components'
|
import { Button, InformationBox, Text } from '@status-im/components'
|
||||||
import { CloseCircleIcon } from '@status-im/icons'
|
import { CloseCircleIcon } from '@status-im/icons'
|
||||||
import PasswordFields from './PasswordFields'
|
import PasswordFields from './PasswordFields'
|
||||||
|
import { useState } from 'react'
|
||||||
|
|
||||||
const KeyGeneration = () => {
|
const KeyGeneration = () => {
|
||||||
|
const [selectedRecoveryMechanism, setSelectedRecoveryMechanism] = useState('key-files')
|
||||||
|
|
||||||
|
const handleRecoveryMechanismChange = (value: string) => {
|
||||||
|
setSelectedRecoveryMechanism(value)
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<YStack space={'$2'} style={{ width: '100%', padding: '16px 32px', alignItems: 'start' }}>
|
<YStack space={'$2'} style={{ width: '100%', padding: '16px 32px', alignItems: 'start' }}>
|
||||||
<KeyGenerationHeader />
|
<KeyGenerationHeader />
|
||||||
<RecoveryMechanism />
|
<RecoveryMechanism
|
||||||
|
selectedRecoveryMechanism={selectedRecoveryMechanism}
|
||||||
|
handleRecoveryMechanismChange={handleRecoveryMechanismChange}
|
||||||
|
/>
|
||||||
<Text size={27} weight={'semibold'}>
|
<Text size={27} weight={'semibold'}>
|
||||||
4 Validators
|
4 Validators
|
||||||
</Text>
|
</Text>
|
||||||
|
|
Loading…
Reference in New Issue