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']} className={styles['recovery-phrase']}
> >
{generatedMnemonic.map((word, index) => ( {generatedMnemonic.length === 24 &&
<XStack style={{ width: '100%' }} key={word}> generatedMnemonic.map((word, index) => (
<Stack> <XStack style={{ width: '100%' }} key={word + index}>
<Text <Stack>
key={index} <Text
size={19} key={index}
weight={'semibold'} size={19}
color="#0d162566" weight={'semibold'}
> color="#0d162566"
{index + 1}.&nbsp; >
{index + 1}.&nbsp;
</Text>
</Stack>
<Text key={index} size={19} weight={'semibold'}>
{word}
</Text> </Text>
</Stack> </Stack>
<Text key={index} size={19} weight={'semibold'}> <Text key={index} size={19} weight={'semibold'}>