Scheduling infrastructure for absolutely everyone.
chore: remove WithLayout from not-found.tsx (#19331)
Benny Joo599744b31c34
diff --git a/apps/web/app/not-found.tsx b/apps/web/app/not-found.tsxindex 5cb55dd872d..d8b2d535a7a 100644--- a/apps/web/app/not-found.tsx+++ b/apps/web/app/not-found.tsx@@ -1,5 +1,5 @@import { _generateMetadata, getTranslate } from "app/_utils";-import { WithLayout } from "app/layoutHOC";+import { type ReadonlyHeaders } from "next/dist/server/web/spec-extension/adapters/headers";import { headers } from "next/headers";import Link from "next/link";@@ -10,6 +10,8 @@ import {import { DOCS_URL, IS_CALCOM, WEBSITE_URL } from "@calcom/lib/constants";import { Icon } from "@calcom/ui";+import PageWrapper from "@components/PageWrapperAppDir";+enum PageType {ORG = "ORG",TEAM = "TEAM",@@ -46,11 +48,9 @@ function getPageInfo(pathname: string, host: string) {}}-async function NotFound() {- const t = await getTranslate();- const headersList = headers();- const host = headersList.get("x-forwarded-host") ?? "";- const pathname = headersList.get("x-pathname") ?? "";+function NotFound({ t, headers }: { t: any; headers: ReadonlyHeaders }) {+ const host = headers.get("x-forwarded-host") ?? "";+ const pathname = headers.get("x-pathname") ?? "";// This makes more sense after full migration to App Router// if (!pathname) {@@ -241,6 +241,14 @@ export const generateMetadata = async () => {};};-export default WithLayout({- ServerPage: NotFound,-});+const ServerPage = async () => {+ const t = await getTranslate();+ const h = headers();+ const nonce = h.get("x-nonce") ?? undefined;+ return (+ <PageWrapper requiresLicense={false} nonce={nonce} themeBasis={null}>+ <NotFound t={t} headers={h} />+ </PageWrapper>+ );+};+export default ServerPage;