'use client';

export default function GlobalError({ error, reset }: { error: Error; reset: () => void }) {
  console.error(error);
  return (
    <html lang="zh-CN">
      <body className="min-h-screen flex flex-col items-center justify-center gap-4 bg-background">
        <h1 className="text-4xl font-bold text-foreground">出错了</h1>
        <p className="text-muted-foreground">应用加载失败，请刷新页面重试</p>
        <button
          onClick={() => reset()}
          className="text-brand-600 hover:text-brand-700 font-medium"
        >
          重新加载
        </button>
      </body>
    </html>
  );
}
