feat(validator-name-address): add link at validator name
This commit is contained in:
parent
7c712f6001
commit
99ab4c25d9
|
@ -7,7 +7,7 @@ import {
|
||||||
CheckIcon,
|
CheckIcon,
|
||||||
} from '@status-im/icons'
|
} from '@status-im/icons'
|
||||||
import { useState } from 'react'
|
import { useState } from 'react'
|
||||||
import { useNavigate } from 'react-router-dom'
|
import { Link } from 'react-router-dom'
|
||||||
|
|
||||||
import { copyFunction, getFormattedValidatorAddress } from '../../utilities'
|
import { copyFunction, getFormattedValidatorAddress } from '../../utilities'
|
||||||
|
|
||||||
|
@ -25,7 +25,6 @@ const ValidatorNameAddress = ({
|
||||||
isAvatarChipIncluded,
|
isAvatarChipIncluded,
|
||||||
}: ValidatorNameAddressProps) => {
|
}: ValidatorNameAddressProps) => {
|
||||||
const [isCopied, setIsCopied] = useState(false)
|
const [isCopied, setIsCopied] = useState(false)
|
||||||
const navigate = useNavigate()
|
|
||||||
|
|
||||||
const onCopyAddress = () => {
|
const onCopyAddress = () => {
|
||||||
copyFunction(address)
|
copyFunction(address)
|
||||||
|
@ -39,20 +38,13 @@ const ValidatorNameAddress = ({
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const onNavigateToManageValidator = () => {
|
|
||||||
navigate(`/manage-validator/${name}`)
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<YStack alignItems={'flex-start'}>
|
<YStack alignItems={'flex-start'}>
|
||||||
<XStack
|
<XStack space={'$1'} alignItems="center" cursor="pointer">
|
||||||
space={'$1'}
|
|
||||||
alignItems="center"
|
|
||||||
onPress={onNavigateToManageValidator}
|
|
||||||
cursor="pointer"
|
|
||||||
>
|
|
||||||
<Text size={13} weight={'semibold'}>
|
<Text size={13} weight={'semibold'}>
|
||||||
Validator {name}
|
<Link to={`/manage-validator/${name}`} style={{ color: 'black' }}>
|
||||||
|
Validator {name}
|
||||||
|
</Link>
|
||||||
</Text>
|
</Text>
|
||||||
{isVerified && <VerifiedIcon size={20} />}
|
{isVerified && <VerifiedIcon size={20} />}
|
||||||
{isAvatarChipIncluded && <ContactIcon size={20} />}
|
{isAvatarChipIncluded && <ContactIcon size={20} />}
|
||||||
|
|
Loading…
Reference in New Issue