From 0ef274e2eaa6102ba835339ce449dd27bee511ad Mon Sep 17 00:00:00 2001 From: Rye Nguyen Date: Fri, 1 Dec 2023 08:25:38 +0700 Subject: [PATCH] feat: add eth scan url for metanodes address --- .../scenes/Main/Metanodes/MetanodeList/index.tsx | 11 +++++++++-- .../scenes/Main/Metanodes/MetanodeList/styled.tsx | 4 +--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/modules/scenes/Main/Metanodes/MetanodeList/index.tsx b/src/modules/scenes/Main/Metanodes/MetanodeList/index.tsx index 1698a3e4..0fd3d682 100644 --- a/src/modules/scenes/Main/Metanodes/MetanodeList/index.tsx +++ b/src/modules/scenes/Main/Metanodes/MetanodeList/index.tsx @@ -14,7 +14,8 @@ import { toggleStatusWord, } from '../../../../metanodes'; import { StylingConstants } from '../../../../styles'; -import { SizeL, TextBlock, TextRoom } from '../../../Common'; +import { SizeL, TextBlock, TextRoom, Atag } from '../../../Common'; +import { getScanDetailBaseEndpoint } from '../../../../pool'; import { AddressP, @@ -55,6 +56,8 @@ export const MetanodeList = (props: Props) => { const { media } = StylingConstants; const xl = useMatchMedia({ query: `(min-width: ${rem(media.xl)})` }); + const baseUrl = getScanDetailBaseEndpoint(bridge); + return ( @@ -108,6 +111,8 @@ export const MetanodeList = (props: Props) => { const isNoRequiredTooltip = xl || node.status === 'CHURNED_IN' || node.status === 'MAY_CHURN_IN'; + const addressUrl = `${baseUrl}/address/${ethAddress}`; + return ( @@ -171,7 +176,9 @@ export const MetanodeList = (props: Props) => { : - {ethAddress} + + {ethAddress} + diff --git a/src/modules/scenes/Main/Metanodes/MetanodeList/styled.tsx b/src/modules/scenes/Main/Metanodes/MetanodeList/styled.tsx index 5092185a..32533d68 100644 --- a/src/modules/scenes/Main/Metanodes/MetanodeList/styled.tsx +++ b/src/modules/scenes/Main/Metanodes/MetanodeList/styled.tsx @@ -220,9 +220,7 @@ export const TextNodeStatus = styled(TextNodeName)` } `; -export const AddressP = styled(AddressLinkP)` - cursor: text; -`; +export const AddressP = styled(AddressLinkP)``; export const CurrencyBox = styled.div` width: ${({ theme }) => rem(theme.pulsar.size.state)};