"use client"; /** * Global error boundary (`app/global-error.tsx`) — renders when the root layout * itself throws (engineering.md F8). Unlike `app/error.tsx` (a segment boundary * that renders inside the root layout), this must render its own * ``/`
` shell and must NOT depend on any provider/context from the * root layout (the layout is the thing that threw). * * Kept intentionally minimal (pure HTML + inline styles, no hooks that consume * global context) to avoid the known Next.js 16 + React 19.2 `/_global-error` * prerender bug (vercel/next.js#84994) where `AppRouterContext` is null during * static generation of the internal error page. */ export default function GlobalError({ error, reset, }: { error: Error & { digest?: string }; reset: () => void; }) { return ({error.message}
{error.digest ? (Error digest: {error.digest}
) : null}