From 059ef17e290dbfb910e7c9a35a8d33a04a99cd4f Mon Sep 17 00:00:00 2001 From: rikhall1515 Date: Thu, 25 Apr 2024 16:45:16 +0200 Subject: [PATCH] feat: add a not-found catch-all route --- app/(public)/[...not-found]/page.tsx | 44 ++++++++++++++++++++++++++++ tsconfig.json | 3 +- 2 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 app/(public)/[...not-found]/page.tsx diff --git a/app/(public)/[...not-found]/page.tsx b/app/(public)/[...not-found]/page.tsx new file mode 100644 index 0000000..ebfcc42 --- /dev/null +++ b/app/(public)/[...not-found]/page.tsx @@ -0,0 +1,44 @@ +import { FaArrowRight } from "react-icons/fa6"; + +import Logo from "@/components/logo"; +import { Button } from "@/components/ui/button"; +import { cn } from "@/lib/utils"; + +export default async function NotFound() { + return ( + <> +
+
+ + 404 +

+ Page{" "} + could{" "} + not{" "} + be{" "} + found +

+

This page does not exist. Try starting again from the homepage.

+ +
+
+
+ + ); +} diff --git a/tsconfig.json b/tsconfig.json index e7edcba..3502c31 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -30,7 +30,8 @@ "**/*.tsx", ".next/types/**/*.ts", "lib/lighthouse/__tests__/index.test.mjs", - "lib/lighthouse/index.mjs" + "lib/lighthouse/index.mjs", + "app/(public)/[...not-found]" ], "exclude": ["node_modules", ".next"] }