"use client";

import "@/app/globals.css";

export default function GlobalError({
  unstable_retry,
}: {
  error: Error & { digest?: string };
  unstable_retry: () => void;
}) {
  return (
    <html lang="en" data-scroll-behavior="smooth">
      <body className="flex min-h-screen items-center justify-center bg-slate-50 px-6 text-center">
        <div>
          <title>Something went wrong | PureSaaS</title>
          <h1 className="text-3xl font-extrabold text-slate-900">Something went wrong</h1>
          <p className="mt-3 text-sm text-slate-600">Please try again in a moment.</p>
          <button type="button" onClick={() => unstable_retry()} className="mt-6 rounded-lg bg-violet-600 px-5 py-3 text-sm font-bold text-white">
            Try again
          </button>
        </div>
      </body>
    </html>
  );
}
