'use client'; import { useEffect } from 'react'; import { useTranslations } from 'next-intl'; import { Button, Heading } from '@/components/ui'; import { Terminal, Activity, AlertTriangle, RefreshCw, Home, ShieldAlert } from 'lucide-react'; import { m } from 'framer-motion'; export default function Error({ error, reset, }: { error: Error & { digest?: string }; reset: () => void; }) { const t = useTranslations('Error'); useEffect(() => { // Force standard solid header document.body.setAttribute('data-header-variant', 'standard'); // Treat "Failed to find Server Action" as a deployment sync issue and reload if (error?.message?.includes('Failed to find Server Action')) { window.location.reload(); return; } console.error('Application error caught by boundary', { message: error?.message || 'Unknown error', stack: error?.stack, digest: error?.digest, }); return () => { document.body.removeAttribute('data-header-variant'); }; }, [error]); return (
{/* Industrial Blueprint Background */}
{/* Decorative Technical Annotations */}
System_Core_Access :: Restricted
Protocol_Failure :: Type_500
{/* Background Glow */}
{/* The "Broken" Machine Visual */}

500 {/* Glitch Layers */} 500 500

{/* Warning Overlay */}
{/* Main Content */}
CRITICAL_SYSTEM_OVERRIDE :: ACTIVE
{t('title')}

{t('description')}

{/* Technical Log Terminal */}
TERMINAL_OUTPUT
[SYSTEM] Initializing recovery protocol...
[ERROR] Connection timeout at node 0x7F
[INFO] Request ID: {error?.digest || '0xDEADBEEF'}
[INFO] Timestamp: {new Date().toISOString()}
[INFO] Trace: {error?.message?.slice(0, 40)}...
_ Waiting for user input...
Status: Handshake_Failed
); }