"use client";

export default function GlobalError({
  error,
  reset,
}: {
  error: Error & { digest?: string };
  reset: () => void;
}) {
  return (
    <html>
      <body>
        <div className="d-flex align-items-center justify-content-center min-vh-100">
          <div className="text-center">
            <h4>Something went wrong</h4>
            <p className="text-muted mb-4">{error.message || "An unexpected error occurred."}</p>
            <button className="btn btn-primary" onClick={() => reset()}>
              Try again
            </button>
          </div>
        </div>
      </body>
    </html>
  );
}
