fix(recovery-phrase): length of array and item key

This commit is contained in:
RadoslavDimchev 2024-02-01 11:30:48 +02:00 committed by Radoslav Dimchev
parent acd06d8fd0
commit ee9a165f44
1 changed files with 15 additions and 10 deletions

View File

@ -64,16 +64,21 @@ const RecoveryPhrase = ({ isKeystoreFiles }: RecoveryPhraseProps) => {
}}
className={styles['recovery-phrase']}
>
{generatedMnemonic.map((word, index) => (
<XStack style={{ width: '100%' }} key={word}>
<Stack>
<Text
key={index}
size={19}
weight={'semibold'}
color="#0d162566"
>
{index + 1}.&nbsp;
{generatedMnemonic.length === 24 &&
generatedMnemonic.map((word, index) => (
<XStack style={{ width: '100%' }} key={word + index}>
<Stack>
<Text
key={index}
size={19}
weight={'semibold'}
color="#0d162566"
>
{index + 1}.&nbsp;
</Text>
</Stack>
<Text key={index} size={19} weight={'semibold'}>
{word}
</Text>
</Stack>
<Text key={index} size={19} weight={'semibold'}>