18 lines
557 B
TypeScript
18 lines
557 B
TypeScript
'use client';
|
||
|
||
export default function ErrorPage({ error, reset }: { error: Error; reset: () => void }) {
|
||
console.error(error);
|
||
return (
|
||
<div className="flex flex-col items-center justify-center min-h-[60vh] gap-4">
|
||
<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>
|
||
</div>
|
||
);
|
||
}
|