feat: show different content for current state
This commit is contained in:
parent
0e5062d1a5
commit
4e8a226e04
|
@ -14,6 +14,11 @@ const KeyGeneration = () => {
|
||||||
setSelectedRecoveryMechanism(value)
|
setSelectedRecoveryMechanism(value)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const isKeyFiles = recoveryMechanism === KEY_FILES || recoveryMechanism === BOTH_KEY_AND_RECOVERY
|
||||||
|
|
||||||
|
const isRecoveryPhrase =
|
||||||
|
recoveryMechanism === RECOVERY_PHRASE || recoveryMechanism === BOTH_KEY_AND_RECOVERY
|
||||||
|
|
||||||
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 />
|
||||||
|
@ -24,8 +29,8 @@ const KeyGeneration = () => {
|
||||||
<Text size={27} weight={'semibold'}>
|
<Text size={27} weight={'semibold'}>
|
||||||
4 Validators
|
4 Validators
|
||||||
</Text>
|
</Text>
|
||||||
{selectedRecoveryMechanism === KEY_FILES && <KeyFiles />}
|
{isKeyFiles && <KeyFiles />}
|
||||||
{selectedRecoveryMechanism === RECOVERY_PHRASE && <RecoveryPhrase />}
|
{isRecoveryPhrase && <RecoveryPhrase />}
|
||||||
</YStack>
|
</YStack>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue