Files
calendar/apps/web/app/not-found.tsx
T
Benny JooandGitHub 02fb7c0ae0 fix: remove window usage in not-found client (#20822)
* remove window usage in not-found client

* fix
2025-04-22 16:04:36 +00:00

34 lines
768 B
TypeScript

import { _generateMetadata } from "app/_utils";
import { headers } from "next/headers";
import PageWrapper from "@components/PageWrapperAppDir";
import { NotFound } from "./notFoundClient";
export const generateMetadata = async () => {
const metadata = await _generateMetadata(
(t) => t("404_page_not_found"),
(t) => t("404_page_not_found")
);
return {
...metadata,
robots: {
index: false,
follow: false,
},
};
};
const ServerPage = async () => {
const h = await headers();
const nonce = h.get("x-nonce") ?? undefined;
const host = h.get("x-forwarded-host") ?? "";
return (
<PageWrapper requiresLicense={false} nonce={nonce}>
<NotFound host={host} />
</PageWrapper>
);
};
export default ServerPage;