Phase 7
This commit is contained in:
189 files changed
+9873
-655
No files matched your search
@@ -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>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user