diff --git a/app/(dashboard)/error.tsx b/app/(dashboard)/error.tsx new file mode 100644 index 0000000..d37423c --- /dev/null +++ b/app/(dashboard)/error.tsx @@ -0,0 +1,38 @@ +"use client"; // Error boundaries must be Client Components + +import { Button } from "@/components/ui/button"; +import { TriangleAlert } from "lucide-react"; +import { useEffect } from "react"; +export default function DashboardError({ + 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! +

+ +
+
+ ); +}