mirror of
https://github.com/status-im/nimbus-gui.git
synced 2025-02-27 10:30:31 +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 onCopyAddress = () => {
|
||||
navigator.clipboard.writeText(address)
|
||||
}
|
||||
|
||||
return (
|
||||
<XStack space={'$2'}>
|
||||
<Avatar
|
||||
@ -27,7 +31,12 @@ const ValidatorProfile = ({ number, address }: ValidatorProfileProps) => {
|
||||
<Text size={13} color="#647084">
|
||||
{getFormattedValidatorAddress(address)}
|
||||
</Text>
|
||||
<CopyIcon size={16} color="#647084" style={{ cursor: 'pointer' }} />
|
||||
<CopyIcon
|
||||
size={16}
|
||||
color="#647084"
|
||||
style={{ cursor: 'pointer' }}
|
||||
onClick={onCopyAddress}
|
||||
/>
|
||||
</XStack>
|
||||
</YStack>
|
||||
</XStack>
|
||||
|
Loading…
x
Reference in New Issue
Block a user