From 46e51d799f15ab9c8663fd98aced437625350b60 Mon Sep 17 00:00:00 2001 From: evandrosaturnino Date: Mon, 16 Dec 2024 22:21:24 -0300 Subject: [PATCH] add loyalty program url if arbitrum is connected --- src/pages/PageLayout.tsx | 9 ++++++++- src/pages/tBTC/index.tsx | 8 ++++++++ src/types/page.ts | 1 + 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/pages/PageLayout.tsx b/src/pages/PageLayout.tsx index 1da9ab318..20f78b869 100644 --- a/src/pages/PageLayout.tsx +++ b/src/pages/PageLayout.tsx @@ -23,10 +23,17 @@ const PageLayout: FC = ({ ? pages.filter((_) => !_.route.hideFromMenu).map((_) => _.route) : [] + const visibleExternalLinks = externalLinks + ? externalLinks?.filter((_) => !_.hideFromMenu) + : [] + return ( <> {links.length > 0 && ( - + )} { + const { chainId } = useIsActive() const externalLinks = [ { title: "tBTC Explorer", href: "https://tbtcscan.com/", }, + { + title: "Loyalty Program", + href: "https://arbitrum.threshold.network/loyalty-program", + hideFromMenu: chainId !== SupportedChainIds.Arbitrum, + }, ] return ( diff --git a/src/types/page.ts b/src/types/page.ts index 473002081..4351dfd5c 100644 --- a/src/types/page.ts +++ b/src/types/page.ts @@ -19,4 +19,5 @@ export type PageComponent = FC & { export type ExternalLinkProps = LinkProps & { title: string + hideFromMenu?: boolean }