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