Initial commit

This commit is contained in:
Zhongwei Li
2025-11-29 18:46:44 +08:00
commit d518f4f28d
13 changed files with 1653 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
'use client';
import * as Sentry from '@sentry/nextjs';
import { useEffect } from 'react';
export default function GlobalError({
error,
reset,
}: {
error: Error & { digest?: string };
reset: () => void;
}) {
useEffect(() => {
Sentry.captureException(error);
}, [error]);
return (
<html>
<body>
<div className="flex min-h-screen items-center justify-center p-4">
<div className="max-w-md rounded-lg border p-6">
<h2 className="mb-2 text-2xl font-semibold">Application Error</h2>
<p className="mb-4 text-gray-600">
A critical error occurred. Please refresh the page.
</p>
<div className="flex gap-2">
<button
onClick={reset}
className="rounded bg-blue-600 px-4 py-2 text-white hover:bg-blue-700"
>
Reload page
</button>
</div>
</div>
</div>
</body>
</html>
);
}