mirror of
https://github.com/status-im/nimbus-gui.git
synced 2025-02-13 11:56:26 +00:00
feat: use func for formatting val address
This commit is contained in:
parent
b09bae74f0
commit
a86d3784e8
@ -2,6 +2,7 @@ import { useState } from 'react'
|
||||
import { XStack, YStack } from 'tamagui'
|
||||
import { Avatar, Checkbox, Text } from '@status-im/components'
|
||||
import { VerifiedIcon, ContactIcon } from '@status-im/icons'
|
||||
import { getFormattedValidatorAddress } from '../../../../utilities'
|
||||
|
||||
type ValidatorListItemProps = {
|
||||
name: string
|
||||
@ -62,7 +63,7 @@ const ValidatorListItem = ({
|
||||
{isVerified && <VerifiedIcon size={20} />}
|
||||
{isAvatarChipIncluded && <ContactIcon size={20} />}
|
||||
</Text>
|
||||
<Text size={13}>{avatarKey}</Text>
|
||||
<Text size={13}>{getFormattedValidatorAddress(avatarKey)}</Text>
|
||||
</YStack>
|
||||
</XStack>
|
||||
{isSelected && <Checkbox id="" variant="outline" size={20} selected={isSelected} />}
|
||||
|
@ -13,15 +13,15 @@ const ValidatorsList = () => {
|
||||
const validators = [
|
||||
{
|
||||
name: 'Validator 1',
|
||||
avatarKey: '37880sfsef38fsb',
|
||||
avatarKey: 'zQ3asdf9d4Gs0',
|
||||
selected: true,
|
||||
isAvatarChipIncluded: true,
|
||||
isVerified: true,
|
||||
},
|
||||
{ name: 'Validator 2', avatarKey: 'hs880sfsef38fsb', isVerified: true },
|
||||
{ name: 'Validator 3', avatarKey: '3nh880sfsef38fsb', isAvatarChipIncluded: true },
|
||||
{ name: 'Validator 4', avatarKey: 'fh7880sfsef38fsb' },
|
||||
{ name: 'Validator 5', avatarKey: 'j77880s..fsef38fsb', isVerified: true },
|
||||
{ name: 'Validator 2', avatarKey: 'zQ3asdf9d4Gs0', isVerified: true },
|
||||
{ name: 'Validator 3', avatarKey: 'zQ3asdf9d4Gs0', isAvatarChipIncluded: true },
|
||||
{ name: 'Validator 4', avatarKey: 'zQ3asdf9d4Gs0' },
|
||||
{ name: 'Validator 5', avatarKey: 'zQ3asdf9d4Gs0', isVerified: true },
|
||||
]
|
||||
const [filteredValidators, setFilteredValidators] = useState(validators)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user