'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 ( {/* Industrial Background Element */}
404
404
{t('title')}

{t('description')}

{/* Decorative Industrial Line */}
); }