From b73780219627b3c03dc94f75e0b5b5abeb3e3105 Mon Sep 17 00:00:00 2001 From: Jay Date: Thu, 30 Nov 2023 10:08:06 +0800 Subject: [PATCH] Disable relayer page (#588) --- .../{relayer => _relayer}/dashboard/page.tsx | 0 .../{relayer => _relayer}/overview/page.tsx | 0 packages/apps/src/components/header.tsx | 18 ++++++++++-------- 3 files changed, 10 insertions(+), 8 deletions(-) rename packages/apps/src/app/{relayer => _relayer}/dashboard/page.tsx (100%) rename packages/apps/src/app/{relayer => _relayer}/overview/page.tsx (100%) diff --git a/packages/apps/src/app/relayer/dashboard/page.tsx b/packages/apps/src/app/_relayer/dashboard/page.tsx similarity index 100% rename from packages/apps/src/app/relayer/dashboard/page.tsx rename to packages/apps/src/app/_relayer/dashboard/page.tsx diff --git a/packages/apps/src/app/relayer/overview/page.tsx b/packages/apps/src/app/_relayer/overview/page.tsx similarity index 100% rename from packages/apps/src/app/relayer/overview/page.tsx rename to packages/apps/src/app/_relayer/overview/page.tsx diff --git a/packages/apps/src/components/header.tsx b/packages/apps/src/components/header.tsx index 4df50eaca..0c0888ab8 100644 --- a/packages/apps/src/components/header.tsx +++ b/packages/apps/src/components/header.tsx @@ -18,6 +18,7 @@ interface NavigationConfig { href: string; external?: boolean; soon?: boolean; + disabled?: boolean; } export default function Header() { @@ -25,7 +26,7 @@ export default function Header() { const pathname = usePathname(); const navigationsConfig = useMemo(() => { - if (pathname.startsWith("/relayer")) { + if (false && pathname.startsWith("/relayer")) { return [ { href: "/relayer/overview", label: "Overview" }, { href: "/relayer/dashboard", label: "Dashboard" }, @@ -34,7 +35,8 @@ export default function Header() { return [ { href: "/", label: "Transfer" }, { href: "/records", label: "Explorer" }, - { href: "/relayer/overview", label: "Relayer" }, + { href: "#", label: "Relayer", disabled: true }, + // { href: "/relayer/overview", label: "Relayer" }, { href: "https://docs.helixbridge.app/", label: "Docs", external: true }, ]; } @@ -66,7 +68,7 @@ export default function Header() { {/* navigations */}
- {navigationsConfig.map(({ href, label, external, soon }) => + {navigationsConfig.map(({ href, label, external, soon, disabled }) => external ? ( {label} - ) : soon ? ( - Coming soon}> + ) : soon || disabled ? ( + {label} ) : ( @@ -118,7 +120,7 @@ export default function Header() {
- {navigationsConfig.map(({ label, href, external, soon }) => + {navigationsConfig.map(({ label, href, external, soon, disabled }) => external ? ( {label} - ) : soon ? ( - Coming soon}> + ) : soon || disabled ? ( + {label} ) : (