"use client"; import * as Sentry from "@sentry/nextjs"; import { useEffect } from "react"; /** * Last-resort boundary for 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 shell or CSS variables from globals.css. */ export default function GlobalError({ error, reset, }: { error: Error & { digest?: string }; reset: () => void; }) { useEffect(() => { Sentry.captureException(error); }, [error]); return (Error
The hotel ran into an unexpected error. Please try again — if it keeps happening, contact staff.
{error.digest ? (Reference: {error.digest}
) : null}