diff --git a/apps/web/app/not-found.tsx b/apps/web/app/not-found.tsx index 3a901b6440..fbd9529d92 100644 --- a/apps/web/app/not-found.tsx +++ b/apps/web/app/not-found.tsx @@ -22,9 +22,11 @@ export const generateMetadata = async () => { const ServerPage = async () => { const h = await headers(); const nonce = h.get("x-nonce") ?? undefined; + const host = h.get("x-forwarded-host") ?? ""; + return ( - + ); }; diff --git a/apps/web/app/notFoundClient.tsx b/apps/web/app/notFoundClient.tsx index 733930657d..0b7173ba09 100644 --- a/apps/web/app/notFoundClient.tsx +++ b/apps/web/app/notFoundClient.tsx @@ -47,11 +47,9 @@ function getPageInfo(pathname: string, host: string) { } } -export function NotFound() { +export function NotFound({ host }: { host: string }) { const { t } = useLocale(); const pathname = usePathname() ?? ""; - const host = window.location.hostname; - const { username, pageType, url } = getPageInfo(pathname, host); const isBookingSuccessPage = pathname?.startsWith("/booking"); const isSubpage = pathname?.includes("/", 2) || isBookingSuccessPage;