feat: show different content for current state

This commit is contained in:
RadoslavDimchev 2023-08-29 09:30:53 +03:00
parent 0e5062d1a5
commit 4e8a226e04
1 changed files with 7 additions and 2 deletions

View File

@ -14,6 +14,11 @@ const KeyGeneration = () => {
setSelectedRecoveryMechanism(value)
}
const isKeyFiles = recoveryMechanism === KEY_FILES || recoveryMechanism === BOTH_KEY_AND_RECOVERY
const isRecoveryPhrase =
recoveryMechanism === RECOVERY_PHRASE || recoveryMechanism === BOTH_KEY_AND_RECOVERY
return (
<YStack space={'$2'} style={{ width: '100%', padding: '16px 32px', alignItems: 'start' }}>
<KeyGenerationHeader />
@ -24,8 +29,8 @@ const KeyGeneration = () => {
<Text size={27} weight={'semibold'}>
4 Validators
</Text>
{selectedRecoveryMechanism === KEY_FILES && <KeyFiles />}
{selectedRecoveryMechanism === RECOVERY_PHRASE && <RecoveryPhrase />}
{isKeyFiles && <KeyFiles />}
{isRecoveryPhrase && <RecoveryPhrase />}
</YStack>
)
}