feat: use new validator name address component to validator list item

This commit is contained in:
RadoslavDimchev 2024-01-18 11:42:39 +02:00
parent 2785e03c44
commit f777542dc1
1 changed files with 9 additions and 14 deletions

View File

@ -1,9 +1,8 @@
import { useState } from 'react' import { useState } from 'react'
import { XStack, YStack } from 'tamagui' import { XStack } from 'tamagui'
import { Avatar, Checkbox, Text } from '@status-im/components' import { Avatar, Checkbox } from '@status-im/components'
import { VerifiedIcon, ContactIcon } from '@status-im/icons'
import { getFormattedValidatorAddress } from '../../../../utilities' import ValidatorNameAddress from '../../ValidatorNameAddress'
type ValidatorListItemProps = { type ValidatorListItemProps = {
name: string name: string
@ -54,16 +53,12 @@ const ValidatorListItem = ({
[11, 20], [11, 20],
]} ]}
/> />
<YStack pl="8px"> <ValidatorNameAddress
<XStack space={'$1'} alignItems="center"> name={name}
<Text size={13} weight={'semibold'}> address={validatorAddress}
Validator {name} isVerified={isVerified}
</Text> isAvatarChipIncluded={isAvatarChipIncluded}
{isVerified && <VerifiedIcon size={20} />} />
{isAvatarChipIncluded && <ContactIcon size={20} />}
</XStack>
<Text size={13}>{getFormattedValidatorAddress(validatorAddress)}</Text>
</YStack>
</XStack> </XStack>
{isSelected && <Checkbox id={name} variant="outline" size={20} selected={isSelected} />} {isSelected && <Checkbox id={name} variant="outline" size={20} selected={isSelected} />}
</XStack> </XStack>