Skip to content

Commit

Permalink
Disable relayer page (#588)
Browse files Browse the repository at this point in the history
  • Loading branch information
JayJay1024 authored Nov 30, 2023
1 parent 5a109d3 commit b737802
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions packages/apps/src/components/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,15 @@ interface NavigationConfig {
href: string;
external?: boolean;
soon?: boolean;
disabled?: boolean;
}

export default function Header() {
const [isDrawerOpen, _, setDrawerOpen, setDrawerClose] = useToggle(false);
const pathname = usePathname();

const navigationsConfig = useMemo<NavigationConfig[]>(() => {
if (pathname.startsWith("/relayer")) {
if (false && pathname.startsWith("/relayer")) {
return [
{ href: "/relayer/overview", label: "Overview" },
{ href: "/relayer/dashboard", label: "Dashboard" },
Expand All @@ -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 },
];
}
Expand Down Expand Up @@ -66,7 +68,7 @@ export default function Header() {

{/* navigations */}
<div className="gap-middle hidden items-center lg:flex">
{navigationsConfig.map(({ href, label, external, soon }) =>
{navigationsConfig.map(({ href, label, external, soon, disabled }) =>
external ? (
<a
rel="noopener noreferrer"
Expand All @@ -79,8 +81,8 @@ export default function Header() {
>
{label}
</a>
) : soon ? (
<Tooltip key={label} content={<span className="text-xs font-normal text-white">Coming soon</span>}>
) : soon || disabled ? (
<Tooltip key={label} content={soon ? "Coming soon" : "This feature is temporarily under maintenance"}>
<span className="rounded-lg px-3 py-1 text-base font-medium text-white/50">{label}</span>
</Tooltip>
) : (
Expand Down Expand Up @@ -118,7 +120,7 @@ export default function Header() {
<div className="flex h-96 w-full items-start justify-center">
<div className="flex w-max flex-col items-start gap-10">
<div className="gap-large flex flex-col">
{navigationsConfig.map(({ label, href, external, soon }) =>
{navigationsConfig.map(({ label, href, external, soon, disabled }) =>
external ? (
<a
rel="noopener noreferrer"
Expand All @@ -129,8 +131,8 @@ export default function Header() {
>
{label}
</a>
) : soon ? (
<Tooltip key={label} content={<span className="text-xs font-normal text-white">Coming soon</span>}>
) : soon || disabled ? (
<Tooltip key={label} content={soon ? "Coming soon" : "This feature is temporarily under maintenance"}>
<span className="font-semibold text-white/50">{label}</span>
</Tooltip>
) : (
Expand Down

0 comments on commit b737802

Please sign in to comment.