File tree Expand file tree Collapse file tree 3 files changed +17
-1
lines changed Expand file tree Collapse file tree 3 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -23,10 +23,17 @@ const PageLayout: FC<PageLayoutProps> = ({
2323 ? pages . filter ( ( _ ) => ! _ . route . hideFromMenu ) . map ( ( _ ) => _ . route )
2424 : [ ]
2525
26+ const visibleExternalLinks = externalLinks
27+ ? externalLinks ?. filter ( ( _ ) => ! _ . hideFromMenu )
28+ : [ ]
29+
2630 return (
2731 < >
2832 { links . length > 0 && (
29- < SubNavigationPills links = { links } externalLinks = { externalLinks } />
33+ < SubNavigationPills
34+ links = { links }
35+ externalLinks = { visibleExternalLinks }
36+ />
3037 ) }
3138 < Container
3239 maxW = { { base : "2xl" , xl : "6xl" } }
Original file line number Diff line number Diff line change @@ -5,13 +5,21 @@ import TBTCBridge from "./Bridge"
55import { featureFlags } from "../../constants"
66import { ExplorerPage } from "./Explorer"
77import { ResumeDepositPage } from "./Bridge/ResumeDeposit"
8+ import { useIsActive } from "../../hooks/useIsActive"
9+ import { SupportedChainIds } from "../../networks/enums/networks"
810
911const MainTBTCPage : PageComponent = ( props ) => {
12+ const { chainId } = useIsActive ( )
1013 const externalLinks = [
1114 {
1215 title : "tBTC Explorer" ,
1316 href : "https://tbtcscan.com/" ,
1417 } ,
18+ {
19+ title : "Loyalty Program" ,
20+ href : "https://arbitrum.threshold.network/loyalty-program" ,
21+ hideFromMenu : chainId !== SupportedChainIds . Arbitrum ,
22+ } ,
1523 ]
1624
1725 return (
Original file line number Diff line number Diff line change @@ -19,4 +19,5 @@ export type PageComponent = FC<RouteProps> & {
1919
2020export type ExternalLinkProps = LinkProps & {
2121 title : string
22+ hideFromMenu ?: boolean
2223}
You can’t perform that action at this time.
0 commit comments