feat: use new component into validator profile
This commit is contained in:
parent
4dbf4d3e8a
commit
0fd00f3489
|
@ -1,8 +1,7 @@
|
||||||
import { Avatar, Text } from '@status-im/components'
|
import { Avatar } from '@status-im/components'
|
||||||
import { XStack, YStack } from 'tamagui'
|
import { XStack } from 'tamagui'
|
||||||
|
|
||||||
import { getFormattedValidatorAddress } from '../../utilities'
|
import ValidatorNameAddress from './ValidatorNameAddress'
|
||||||
import { CopyIcon } from '@status-im/icons'
|
|
||||||
|
|
||||||
type ValidatorProfileProps = {
|
type ValidatorProfileProps = {
|
||||||
number: number
|
number: number
|
||||||
|
@ -10,10 +9,6 @@ type ValidatorProfileProps = {
|
||||||
}
|
}
|
||||||
|
|
||||||
const ValidatorProfile = ({ number, address }: ValidatorProfileProps) => {
|
const ValidatorProfile = ({ number, address }: ValidatorProfileProps) => {
|
||||||
const onCopyAddress = () => {
|
|
||||||
navigator.clipboard.writeText(address)
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<XStack space={'$2'}>
|
<XStack space={'$2'}>
|
||||||
<Avatar
|
<Avatar
|
||||||
|
@ -23,22 +18,7 @@ const ValidatorProfile = ({ number, address }: ValidatorProfileProps) => {
|
||||||
name={number.toString()}
|
name={number.toString()}
|
||||||
indicator="online"
|
indicator="online"
|
||||||
/>
|
/>
|
||||||
<YStack>
|
<ValidatorNameAddress number={number} address={address} />
|
||||||
<Text size={15} weight={'semibold'}>
|
|
||||||
Validator {number}
|
|
||||||
</Text>
|
|
||||||
<XStack space={'$1'} style={{ alignItems: 'center' }}>
|
|
||||||
<Text size={13} color="#647084">
|
|
||||||
{getFormattedValidatorAddress(address)}
|
|
||||||
</Text>
|
|
||||||
<CopyIcon
|
|
||||||
size={16}
|
|
||||||
color="#647084"
|
|
||||||
style={{ cursor: 'pointer' }}
|
|
||||||
onClick={onCopyAddress}
|
|
||||||
/>
|
|
||||||
</XStack>
|
|
||||||
</YStack>
|
|
||||||
</XStack>
|
</XStack>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue