This commit is contained in:
Stefan Lazic committed 2026-08-03 21:15:24 +01:00
1 parent ec5583f972
commit 546613e677
189 files changed
+9873 -655

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
"use client";
import { ErrorState } from "@/components/feedback/error-state";
/**
* Root error boundary — catches anything that escapes a more specific
* one (see (customer)/error.tsx, (staff)/error.tsx, (owner)/error.tsx),
* so a crash anywhere in the app shows this app-styled fallback instead
* of Next's default error page. `reset` re-renders the segment that
* threw, which is enough to recover from a transient failure (a flaky
* fetch, a stale cache) without a full page reload.
*/
export default function RootError({ reset }: { error: Error & { digest?: string }; reset: () => void }) {
return (
<html lang="en">
<body className="bg-stone font-sans">
<div id="main-content">
<ErrorState onRetry={reset} />
</div>
</body>
</html>
);
}