From fa40f1ead5b6463261749f32ebcc85820c8ad187 Mon Sep 17 00:00:00 2001 From: Keith Williams Date: Tue, 9 Jul 2024 11:35:34 +0100 Subject: [PATCH] fix: 404s becoming 500s (#15696) --- apps/web/app/not-found.tsx | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/apps/web/app/not-found.tsx b/apps/web/app/not-found.tsx index ff586f73ea..a9a4bb5c92 100644 --- a/apps/web/app/not-found.tsx +++ b/apps/web/app/not-found.tsx @@ -1,17 +1,12 @@ -import NotFoundPage from "@pages/404"; -import { WithLayout } from "app/layoutHOC"; -import type { GetStaticPropsContext } from "next"; +import React from "react"; -import { getTranslations } from "@server/lib/getTranslations"; - -const getData = async (context: GetStaticPropsContext) => { - const i18n = await getTranslations(context); - - return { - i18n, - }; +const NotFound = () => { + return ( +
+

404 - Page Not Found

+

Sorry, the page you are looking for does not exist.

+
+ ); }; -export const dynamic = "force-static"; - -export default WithLayout({ getLayout: null, getData, Page: NotFoundPage }); +export default NotFound;