From f42ee88b51e337d8d98c1a1b4960baf5bbcb0c8f Mon Sep 17 00:00:00 2001 From: Chirag Date: Mon, 2 Dec 2024 11:28:31 +0530 Subject: [PATCH] Added Lucide React ArrowUpRight icon, getBlockExplorerLink utility, and external links to portal details --- explorer/src/pages/Portal/index.tsx | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/explorer/src/pages/Portal/index.tsx b/explorer/src/pages/Portal/index.tsx index e8f20d35..163cb7f6 100644 --- a/explorer/src/pages/Portal/index.tsx +++ b/explorer/src/pages/Portal/index.tsx @@ -1,4 +1,5 @@ import { t } from "i18next"; +import { ArrowUpRight } from "lucide-react"; import { useCallback } from "react"; import { useParams } from "react-router-dom"; import useSWR from "swr"; @@ -12,6 +13,7 @@ import { EMPTY_STRING } from "@/constants"; import { regexEthAddress } from "@/constants/regex"; import { SWRKeys } from "@/interfaces/swr/enum"; import { useNetworkContext } from "@/providers/network-provider/context"; +import { getBlockExplorerLink } from "@/utils"; import { PortalLoadingSkeleton } from "./components/PortalLoadingSkeleton"; import { PortalModules } from "./components/PortalModules"; @@ -60,10 +62,12 @@ export const Portal = () => { { title: t("portal.id"), subtitle: portal.id, + link: chain ? `${getBlockExplorerLink(chain)}/${portal.id}` : "#", }, { title: t("portal.ownerAddress"), subtitle: displayPortalOwnerEnsAddress(), + link: chain ? `${getBlockExplorerLink(chain)}/${portal.ownerAddress}` : "#", }, { title: t("portal.revokable.title"), @@ -85,10 +89,21 @@ export const Portal = () => {
- {list.map(({ title, subtitle }) => ( + {list.map(({ title, subtitle, link }) => (

{title}

-

{subtitle}

+ {link ? ( + + {subtitle} + + + ) : ( +

{subtitle}

+ )}
))}