Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 1m19s
Build & Deploy / 🧪 QA (push) Failing after 3m32s
Build & Deploy / 🚀 Deploy (push) Has been skipped
Build & Deploy / 🏗️ Build (push) Failing after 7m51s
Build & Deploy / ⚡ Lighthouse (push) Has been skipped
Build & Deploy / 🧪 Smoke Test (push) Has been skipped
Build & Deploy / ♿ WCAG (push) Has been skipped
Build & Deploy / 🛡️ Quality Gates (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 10s
67 lines
2.3 KiB
TypeScript
67 lines
2.3 KiB
TypeScript
'use client';
|
|
import { useTranslations } from 'next-intl';
|
|
import { Container, Button, Heading } from '@/components/ui';
|
|
import Scribble from '@/components/Scribble';
|
|
import { useEffect } from 'react';
|
|
import { useAnalytics } from '@/components/analytics/useAnalytics';
|
|
import { AnalyticsEvents } from '@/components/analytics/analytics-events';
|
|
|
|
export default function NotFound() {
|
|
const t = useTranslations('Error.notFound');
|
|
const { trackEvent } = useAnalytics();
|
|
|
|
useEffect(() => {
|
|
const errorUrl = typeof window !== 'undefined' ? window.location.pathname : 'unknown';
|
|
trackEvent(AnalyticsEvents.ERROR, {
|
|
type: '404_not_found',
|
|
path: errorUrl,
|
|
});
|
|
|
|
// Explicitly send the 404 to Sentry so we have visibility into broken links
|
|
import('@sentry/nextjs').then((Sentry) => {
|
|
Sentry.withScope((scope) => {
|
|
scope.setTag('status_code', '404');
|
|
scope.setTag('path', errorUrl);
|
|
Sentry.captureMessage(`Route Not Found: ${errorUrl}`, 'warning');
|
|
});
|
|
});
|
|
}, [trackEvent]);
|
|
|
|
return (
|
|
<Container className="relative py-24 flex flex-col items-center justify-center text-center min-h-[70vh] overflow-hidden">
|
|
{/* Industrial Background Element */}
|
|
<div className="absolute inset-0 -z-10 opacity-[0.03] pointer-events-none flex items-center justify-center">
|
|
<span className="text-[20rem] font-bold select-none">404</span>
|
|
</div>
|
|
|
|
<div className="relative mb-8">
|
|
<Heading level={1} className="text-6xl md:text-8xl font-bold mb-2">
|
|
404
|
|
</Heading>
|
|
<Scribble
|
|
variant="circle"
|
|
className="w-[150%] h-[150%] -top-[25%] -left-[25%] text-accent/40"
|
|
/>
|
|
</div>
|
|
|
|
<Heading level={2} className="text-2xl md:text-3xl font-bold mb-4 text-primary">
|
|
{t('title')}
|
|
</Heading>
|
|
|
|
<p className="text-white/60 mb-10 max-w-md text-lg">{t('description')}</p>
|
|
|
|
<div className="flex flex-col sm:flex-row gap-4">
|
|
<Button href="/" variant="accent" size="lg">
|
|
{t('cta')}
|
|
</Button>
|
|
<Button href="/contact" variant="outline" size="lg">
|
|
Contact Support
|
|
</Button>
|
|
</div>
|
|
|
|
{/* Decorative Industrial Line */}
|
|
<div className="absolute bottom-0 left-1/2 -translate-x-1/2 w-px h-24 bg-gradient-to-t from-accent/50 to-transparent" />
|
|
</Container>
|
|
);
|
|
}
|