diff --git a/src/app/error.tsx b/src/app/error.tsx new file mode 100644 index 0000000000..a34504181b --- /dev/null +++ b/src/app/error.tsx @@ -0,0 +1,33 @@ +"use client"; + +import { useEffect } from "react"; + +const ErrorBoundary = ({ + error, + reset, +}: { + error: Error & { digest?: string }; + reset: () => void; +}) => { + useEffect(() => { + // Log the error to an error reporting service + console.error(error); + }, [error]); + + return ( +
+

Something went wrong!

+ +
+ ); +}; + +export default ErrorBoundary; diff --git a/src/app/not-found.tsx b/src/app/not-found.tsx new file mode 100644 index 0000000000..3440a40d18 --- /dev/null +++ b/src/app/not-found.tsx @@ -0,0 +1,11 @@ +import Link from "next/link"; + +export default function NotFound() { + return ( +
+

Not Found

+

Could not find requested resource

+ Return Home +
+ ); +}