diff --git a/thoughts-frontend/app/error.tsx b/thoughts-frontend/app/error.tsx new file mode 100644 index 0000000..3a4e3db --- /dev/null +++ b/thoughts-frontend/app/error.tsx @@ -0,0 +1,31 @@ +"use client"; + +import { useEffect } from "react"; +import { Button } from "@/components/ui/button"; + +export default function Error({ + error, + reset, +}: { + error: Error & { digest?: string }; + reset: () => void; +}) { + useEffect(() => { + console.error(error); + }, [error]); + + return ( +
+
+

Oops

+

Something went wrong

+

+ An unexpected error occurred. Try again or come back later. +

+ +
+
+ ); +} diff --git a/thoughts-frontend/app/not-found.tsx b/thoughts-frontend/app/not-found.tsx new file mode 100644 index 0000000..560f30f --- /dev/null +++ b/thoughts-frontend/app/not-found.tsx @@ -0,0 +1,19 @@ +import Link from "next/link"; +import { Button } from "@/components/ui/button"; + +export default function NotFound() { + return ( +
+
+

404

+

Page not found

+

+ This page doesn't exist or was moved. +

+ +
+
+ ); +}