mirror of
https://github.com/status-im/nimbus-gui.git
synced 2025-02-27 18:40:33 +00:00
feat: add copy address handler
This commit is contained in:
parent
a66b08f21a
commit
c5eb85b018
@ -10,6 +10,10 @@ 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
|
||||||
@ -27,7 +31,12 @@ const ValidatorProfile = ({ number, address }: ValidatorProfileProps) => {
|
|||||||
<Text size={13} color="#647084">
|
<Text size={13} color="#647084">
|
||||||
{getFormattedValidatorAddress(address)}
|
{getFormattedValidatorAddress(address)}
|
||||||
</Text>
|
</Text>
|
||||||
<CopyIcon size={16} color="#647084" style={{ cursor: 'pointer' }} />
|
<CopyIcon
|
||||||
|
size={16}
|
||||||
|
color="#647084"
|
||||||
|
style={{ cursor: 'pointer' }}
|
||||||
|
onClick={onCopyAddress}
|
||||||
|
/>
|
||||||
</XStack>
|
</XStack>
|
||||||
</YStack>
|
</YStack>
|
||||||
</XStack>
|
</XStack>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user