From a9c936d288137ee1f302c77ea6d46c659cbaa238 Mon Sep 17 00:00:00 2001 From: Michal Zielenkiewicz Date: Wed, 13 Nov 2024 16:54:19 +0100 Subject: [PATCH] Fix highlighted text in ConsensusAccountLink --- src/app/components/Account/ConsensusAccountLink.tsx | 12 +++++++++++- .../components/Validators/DeferredValidatorLink.tsx | 2 +- src/app/components/Validators/ValidatorLink.tsx | 8 ++++---- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/src/app/components/Account/ConsensusAccountLink.tsx b/src/app/components/Account/ConsensusAccountLink.tsx index 16f60252d..8d2470295 100644 --- a/src/app/components/Account/ConsensusAccountLink.tsx +++ b/src/app/components/Account/ConsensusAccountLink.tsx @@ -9,6 +9,7 @@ type ConsensusAccountLinkProps = { alwaysTrim?: boolean labelOnly?: boolean network: Network + highlightedPartOfName?: string | undefined } export const ConsensusAccountLink: FC = ({ @@ -16,11 +17,19 @@ export const ConsensusAccountLink: FC = ({ alwaysTrim = true, labelOnly, network, + highlightedPartOfName, }) => { const { data } = useGetConsensusValidatorsAddressNameMap(network) if (data?.data?.[address]) { - return + return ( + + ) } return ( @@ -29,6 +38,7 @@ export const ConsensusAccountLink: FC = ({ scope={{ network, layer: Layer.consensus }} address={address} alwaysTrim={alwaysTrim} + highlightedPartOfName={highlightedPartOfName} /> ) } diff --git a/src/app/components/Validators/DeferredValidatorLink.tsx b/src/app/components/Validators/DeferredValidatorLink.tsx index 79df09789..aef73260c 100644 --- a/src/app/components/Validators/DeferredValidatorLink.tsx +++ b/src/app/components/Validators/DeferredValidatorLink.tsx @@ -22,7 +22,7 @@ export const DeferredValidatorLink: FC<{ address={address} network={scope.network} name={validator?.media?.name} - highlightedPart={highlightedPart} + highlightedPartOfName={highlightedPart} /> ) } diff --git a/src/app/components/Validators/ValidatorLink.tsx b/src/app/components/Validators/ValidatorLink.tsx index add3f1bcd..2d6c0a529 100644 --- a/src/app/components/Validators/ValidatorLink.tsx +++ b/src/app/components/Validators/ValidatorLink.tsx @@ -15,7 +15,7 @@ type ValidatorLinkProps = { name?: string network: Network alwaysTrim?: boolean - highlightedPart?: string + highlightedPartOfName?: string } export const ValidatorLink: FC = ({ @@ -23,7 +23,7 @@ export const ValidatorLink: FC = ({ name, network, alwaysTrim, - highlightedPart, + highlightedPartOfName, }) => { const { isTablet } = useScreenSize() const to = RouteUtils.getValidatorRoute(network, address) @@ -36,7 +36,7 @@ export const ValidatorLink: FC = ({ address={address} name={name || validatorName} to={to} - highlightedPart={highlightedPart} + highlightedPart={highlightedPartOfName} /> ) : ( = ({ alwaysTrim={alwaysTrim} name={name || validatorName} to={to} - highlightedPart={highlightedPart} + highlightedPart={highlightedPartOfName} /> )}