Files
DefectingCat.github.io/app/global-error.tsx
2025-05-19 20:09:20 +08:00

32 lines
626 B
TypeScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

'use client';
import clsx from 'clsx';
import Button from 'components/rua/button';
const GlobalError = ({
error,
reset,
}: {
error: Error & { digest?: string };
reset: () => void;
}) => {
console.error(error);
return (
<html>
<body
className={clsx('w-full h-dvh flex', 'justify-center items-center')}
>
<div>
<h2 className="text-xl mb-1">Something went wrong! ( OωO)</h2>
<Button onClick={() => reset()} className="cursor-pointer">
Try again
</Button>
</div>
</body>
</html>
);
};
export default GlobalError;