diff --git a/app/(app)/[...slug]/page.tsx b/app/(app)/[...slug]/page.tsx new file mode 100644 index 0000000..539cb28 --- /dev/null +++ b/app/(app)/[...slug]/page.tsx @@ -0,0 +1,15 @@ +/** + * @file app/(app)/[...slug]/page.tsx + * @description Catch-all route handler for undefined paths within the (app) route group, triggering a Next.js 404 page. + */ + +import { notFound } from "next/navigation"; + +/** + * Catches any unmatched nested sub-routes inside the application layout and delegates to the Next.js notFound handler. + * + * @returns {never} Triggers a Next.js 404 Not Found response. + */ +export default function CatchAllNotFound() { + notFound(); +} diff --git a/app/(app)/not-found.tsx b/app/(app)/not-found.tsx new file mode 100644 index 0000000..73580fd --- /dev/null +++ b/app/(app)/not-found.tsx @@ -0,0 +1,47 @@ +/** + * @file app/(app)/not-found.tsx + * @description Server component rendering a custom 404 page for missing or invalid routes within the app layout. + */ + +import Link from "next/link"; +import { AlertCircle, ArrowLeft } from "lucide-react"; + +/** + * Renders the 404 Not Found fallback view containing an alert icon, message, and navigation link back to the summary page. + * + * @returns {JSX.Element} The rendered not found page component. + */ +export default function NotFound() { + return ( +
+
+ {/* Icon Badge */} +
+ +
+ + {/* Text Content */} +
+

+ Page not found +

+

+ The page you are looking for doesn't exist or has been moved. Please + check the URL or head back to your summary. +

+
+ + {/* Action Button */} +
+ + + Back to Summary + +
+
+
+ ); +}