-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patherror.tsx
More file actions
25 lines (23 loc) · 714 Bytes
/
Copy patherror.tsx
File metadata and controls
25 lines (23 loc) · 714 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
"use client";
import { Button } from "@/components/ui/button";
/** Root error boundary — App Router requires this to be a Client Component. */
export default function Error({
error,
reset,
}: {
error: Error & { digest?: string };
reset: () => void;
}) {
return (
<main className="flex min-h-dvh flex-col items-center justify-center gap-4 px-6 text-center">
<h1 className="text-2xl font-semibold">Something went wrong</h1>
<p className="max-w-md text-sm text-muted-foreground">
An unexpected error occurred
{error.digest ? ` (ref: ${error.digest})` : ""}.
</p>
<Button onClick={reset} variant="outline">
Try again
</Button>
</main>
);
}