File tree Expand file tree Collapse file tree
components/layout/NotFoundPage Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ import { notFound } from "next/navigation" ;
2+
3+ export default function CatchAllPage ( ) {
4+ notFound ( ) ;
5+ }
Original file line number Diff line number Diff line change 1+ // Note that `app/[locale]/[...rest]/page.tsx`
2+ // is necessary for this page to render.
3+
4+ export { default } from "@/components/layout/NotFoundPage" ;
Original file line number Diff line number Diff line change 11"use client" ;
22
3- import NotFoundPage from "@/components/layout/NotFoundPage" ;
3+ import Error from "next/error" ;
4+
5+ // This page renders when a route like `/unknown.txt` is requested.
6+ // In this case, the layout at `app/[locale]/layout.tsx` receives
7+ // an invalid value as the `[locale]` param and calls `notFound()`.
48
59export default function GlobalNotFound ( ) {
610 return (
711 < html lang = "en" >
8- < body suppressHydrationWarning className = "flex h-screen w-full items-center justify-center" >
9- < NotFoundPage />
12+ < body >
13+ < Error statusCode = { 404 } /> ;
1014 </ body >
1115 </ html >
1216 ) ;
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import Link from "next/link";
44
55const NotFoundPage = ( ) => {
66 return (
7- < div className = "flex flex-col items-center gap-6 text-center" >
7+ < div className = "flex h-screen w-full flex-col items-center justify -center gap-6 text-center" >
88 < Image
99 src = "/assets/images/illustrations/404.svg"
1010 alt = "not-found"
You can’t perform that action at this time.
0 commit comments