63 lines
1.4 KiB
TypeScript
63 lines
1.4 KiB
TypeScript
'use client';
|
|
|
|
export default function GlobalError({
|
|
error,
|
|
reset,
|
|
}: {
|
|
error: Error & { digest?: string };
|
|
reset: () => void;
|
|
}) {
|
|
return (
|
|
<html lang="en">
|
|
<head>
|
|
<title>Error - kandev.ai</title>
|
|
</head>
|
|
<body style={{
|
|
margin: 0,
|
|
padding: 0,
|
|
fontFamily: 'system-ui, sans-serif',
|
|
display: 'flex',
|
|
minHeight: '100vh',
|
|
alignItems: 'center',
|
|
justifyContent: 'center',
|
|
backgroundColor: '#ffffff'
|
|
}}>
|
|
<div style={{
|
|
textAlign: 'center',
|
|
padding: '2rem'
|
|
}}>
|
|
<h1 style={{
|
|
fontSize: '2rem',
|
|
fontWeight: 'bold',
|
|
marginBottom: '1rem',
|
|
color: '#000000'
|
|
}}>
|
|
Something went wrong!
|
|
</h1>
|
|
<p style={{
|
|
marginBottom: '2rem',
|
|
color: '#666666'
|
|
}}>
|
|
We're sorry, but something unexpected happened.
|
|
</p>
|
|
<button
|
|
onClick={() => reset()}
|
|
style={{
|
|
padding: '0.75rem 1.5rem',
|
|
backgroundColor: '#6B46C1',
|
|
color: '#ffffff',
|
|
border: 'none',
|
|
borderRadius: '0.5rem',
|
|
fontSize: '1rem',
|
|
fontWeight: '500',
|
|
cursor: 'pointer'
|
|
}}
|
|
>
|
|
Try again
|
|
</button>
|
|
</div>
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|