|
| 1 | +'use client'; |
| 2 | + |
| 3 | +import { useEffect } from 'react'; |
| 4 | +import Link from 'next/link'; |
| 5 | +import Background from '@/components/portal/Background'; |
| 6 | +import { LiquidGlass } from '@/components/portal/LiquidGlass'; |
| 7 | + |
| 8 | +export default function Error({ |
| 9 | + error, |
| 10 | + reset, |
| 11 | +}: { |
| 12 | + error: Error & { digest?: string }; |
| 13 | + reset: () => void; |
| 14 | +}) { |
| 15 | + useEffect(() => { |
| 16 | + console.error("Hackathon Detail Page Error:", error); |
| 17 | + }, [error]); |
| 18 | + |
| 19 | + return ( |
| 20 | + <div className="relative min-h-screen bg-[#050505] text-gray-400 font-sans selection:bg-[#00A8A8]/30 overflow-x-hidden flex items-center justify-center"> |
| 21 | + <Background className="fixed inset-0 z-0 opacity-[0.03]" /> |
| 22 | + |
| 23 | + <main className="relative z-10 w-full max-w-xl px-6"> |
| 24 | + <LiquidGlass className="p-12 text-center border-red-500/20"> |
| 25 | + <div className="w-16 h-16 rounded-2xl bg-red-500/10 border border-red-500/20 flex items-center justify-center mx-auto mb-6"> |
| 26 | + <svg className="w-8 h-8 text-red-500" fill="none" viewBox="0 0 24 24" stroke="currentColor"> |
| 27 | + <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z" /> |
| 28 | + </svg> |
| 29 | + </div> |
| 30 | + |
| 31 | + <h2 className="text-3xl font-black text-white uppercase tracking-tight mb-4"> |
| 32 | + System Failure |
| 33 | + </h2> |
| 34 | + |
| 35 | + <p className="text-sm font-mono text-gray-400 mb-8"> |
| 36 | + The hacker terminal encountered an unexpected fault line. We've logged the anomaly. |
| 37 | + <br /><br /> |
| 38 | + <span className="text-red-400/80 text-xs bg-red-500/10 px-3 py-1 rounded border border-red-500/10"> |
| 39 | + {error.message || "Unknown rendering exception"} |
| 40 | + </span> |
| 41 | + </p> |
| 42 | + |
| 43 | + <div className="flex flex-col sm:flex-row gap-4 justify-center"> |
| 44 | + <button |
| 45 | + onClick={() => reset()} |
| 46 | + className="px-6 py-3 bg-[#00A8A8] text-black font-black uppercase tracking-widest text-sm rounded-xl hover:bg-white transition-colors" |
| 47 | + > |
| 48 | + Reboot System |
| 49 | + </button> |
| 50 | + <Link |
| 51 | + href="/hackathons" |
| 52 | + className="px-6 py-3 bg-white/5 border border-white/10 text-white font-bold uppercase tracking-widest text-sm rounded-xl hover:bg-white/10 transition-colors" |
| 53 | + > |
| 54 | + Back to Hackathons |
| 55 | + </Link> |
| 56 | + </div> |
| 57 | + </LiquidGlass> |
| 58 | + </main> |
| 59 | + </div> |
| 60 | + ); |
| 61 | +} |
0 commit comments