/** * 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 { useEffect } from "react"; import "./globals.css"; import { getLang, translate } from "@/i18n/messages"; import { callMiniAppReadyOnce } from "@/lib/telegram-ready"; import { THEME_BOOTSTRAP_SCRIPT } from "@/lib/theme-bootstrap-script"; import { Button } from "@/components/ui/button"; import { MiniAppScreen, MiniAppScreenContent } from "@/components/layout/MiniAppScreen"; export default function GlobalError({ error, reset, }: { error: Error & { digest?: string }; reset: () => void; }) { const lang = getLang(); useEffect(() => { callMiniAppReadyOnce(); }, []); return (