Files
klz-cables.com/app/[locale]/error.tsx
Marc Mintel 6e34392976
Some checks failed
Build & Deploy / deploy (push) Failing after 3m39s
build
2026-01-19 20:46:39 +01:00

33 lines
788 B
TypeScript

'use client';
import * as Sentry from '@sentry/nextjs';
import { useEffect } from 'react';
import { useTranslations } from 'next-intl';
import { Container, Button } from '@/components/ui';
export default function Error({
error,
reset,
}: {
error: Error & { digest?: string };
reset: () => void;
}) {
const t = useTranslations('Error');
useEffect(() => {
Sentry.captureException(error);
}, [error]);
return (
<Container className="py-24 flex flex-col items-center justify-center text-center min-h-[60vh]">
<h2 className="text-3xl font-bold mb-4">{t('title')}</h2>
<p className="text-white/60 mb-8 max-w-md">
{t('description')}
</p>
<Button onClick={() => reset()}>
{t('tryAgain')}
</Button>
</Container>
);
}