/** * Next.js root error boundary. Replaces the root layout when an unhandled error occurs. * Must define its own html/body. For most runtime errors the in-app AppErrorBoundary is used. */ "use client"; import "./globals.css"; import { getLang, translate } from "@/i18n/messages"; export default function GlobalError({ error, reset, }: { error: Error & { digest?: string }; reset: () => void; }) { const lang = getLang(); return ( {/* Same theme detection as layout: hash / Telegram / prefers-color-scheme → data-theme */}