diff --git a/islands/link.tsx b/islands/link.tsx index bf21268..77f5c3d 100644 --- a/islands/link.tsx +++ b/islands/link.tsx @@ -1,21 +1,22 @@ import { JSX } from "preact"; import { IS_BROWSER } from "$fresh/runtime.ts"; -// import { getDomain } from "../util/mod.ts"; fix this shit breaking the nacbar when it fails +import { getDomain } from "../util/mod.ts"; export function Link( { href, ...props }: JSX.HTMLAttributes, ) { if ( - IS_BROWSER && typeof href === "string" && typeof window !== "undefined" + IS_BROWSER && typeof href === "string" && typeof window !== "undefined" && + window.location.hostname !== "localhost" ) { - // const { subdomain, domain } = getDomain(window.location.hostname); - // console.log(subdomain, domain); - // if (subdomain) { - // return ; - // } else { - return ; - // } + const { subdomain, domain } = getDomain(window.location.hostname); + console.log(subdomain, domain); + if (subdomain) { + return ; + } else { + return ; + } } else { return ; } diff --git a/islands/site-header.tsx b/islands/site-header.tsx index d84efb9..4b18370 100644 --- a/islands/site-header.tsx +++ b/islands/site-header.tsx @@ -60,10 +60,7 @@ export default function SiteHeader({ children }: Props) { {showMenu && (