"use client"; import { useEffect } from "react"; // Last-resort boundary: catches errors thrown in the root layout itself. It // replaces the whole document, so it must render its own /
and can't // rely on the app's global CSS — hence inline styles. export default function GlobalError({ error, reset, }: { error: Error & { digest?: string }; reset: () => void; }) { useEffect(() => { console.error("Global error boundary caught:", error); }, [error]); return (The site hit an unexpected error. Please try again in a moment.
{error?.digest && (ref: {error.digest}
)} ); }