feat: change recovery mechanism structure
This commit is contained in:
parent
09489520f3
commit
e1dd7b9066
|
@ -8,7 +8,11 @@ type RecoveryMechanismProps = {
|
||||||
recoveryMechanism: string
|
recoveryMechanism: string
|
||||||
}
|
}
|
||||||
|
|
||||||
const cards = [RECOVERY_PHRASE, KEYSTORE_FILES, BOTH_KEY_AND_RECOVERY]
|
const cards = {
|
||||||
|
[RECOVERY_PHRASE]: 'recovery-phrase-icon.svg',
|
||||||
|
[KEYSTORE_FILES]: 'keystore-files-icon.svg',
|
||||||
|
[BOTH_KEY_AND_RECOVERY]: 'both-recovery-keystore-icon.svg',
|
||||||
|
}
|
||||||
|
|
||||||
const RecoveryMechanism = ({ recoveryMechanism }: RecoveryMechanismProps) => {
|
const RecoveryMechanism = ({ recoveryMechanism }: RecoveryMechanismProps) => {
|
||||||
return (
|
return (
|
||||||
|
@ -17,8 +21,13 @@ const RecoveryMechanism = ({ recoveryMechanism }: RecoveryMechanismProps) => {
|
||||||
Select Recovery Mechanism
|
Select Recovery Mechanism
|
||||||
</Text>
|
</Text>
|
||||||
<XStack space={'$4'} style={{ justifyContent: 'space-between', marginTop: '40px' }}>
|
<XStack space={'$4'} style={{ justifyContent: 'space-between', marginTop: '40px' }}>
|
||||||
{cards.map(value => (
|
{Object.entries(cards).map(([value, icon]) => (
|
||||||
<RecoveryMechanismCard key={value} value={value} recoveryMechanism={recoveryMechanism} />
|
<RecoveryMechanismCard
|
||||||
|
key={value}
|
||||||
|
value={value}
|
||||||
|
recoveryMechanism={recoveryMechanism}
|
||||||
|
icon={icon}
|
||||||
|
/>
|
||||||
))}
|
))}
|
||||||
</XStack>
|
</XStack>
|
||||||
</YStack>
|
</YStack>
|
||||||
|
|
Loading…
Reference in New Issue