|
| 1 | +import { Link } from "react-router"; |
| 2 | +import { useMemo } from "react"; |
| 3 | +import { HTHeader } from "./HTHeader"; |
| 4 | +import { HTFooter } from "./HTFooter"; |
| 5 | + |
| 6 | +const messages = [ |
| 7 | + "404: This path is off the grid. It either got wiped or never existed.", |
| 8 | + "Dead link detected. The resource you’re probing isn’t here.", |
| 9 | + "Nothing to see here—this route’s a ghost in the machine.", |
| 10 | + "Page not found. Either it’s been moved, or it was just a rumor.", |
| 11 | + "You’ve reached a null sector. No data lives at this address.", |
| 12 | + "Invalid opcode. This page cannot be executed.", |
| 13 | + "Access denied: target not in scope.", |
| 14 | + "Glitch in the system. That page never compiled.", |
| 15 | +]; |
| 16 | + |
| 17 | +export default function NotFound() { |
| 18 | + const message = useMemo( |
| 19 | + () => messages[Math.floor(Math.random() * messages.length)], |
| 20 | + [] |
| 21 | + ); |
| 22 | + |
| 23 | + return ( |
| 24 | + <div className="min-h-dvh flex flex-col"> |
| 25 | + <HTHeader /> |
| 26 | + |
| 27 | + <main id="main" className="flex-1 flex items-center justify-center px-6"> |
| 28 | + <div className="text-center"> |
| 29 | + <h1 className="text-4xl md:text-6xl font-extrabold tracking-tight text-gray-100"> |
| 30 | + 404 — Page not found |
| 31 | + </h1> |
| 32 | + <p className="mt-4 text-gray-400">{message}</p> |
| 33 | + |
| 34 | + <div className="mt-8 flex flex-wrap items-center justify-center gap-3"> |
| 35 | + <Link |
| 36 | + to="/conferences" |
| 37 | + className="rounded-md border border-gray-700 px-4 py-2 |
| 38 | + text-gray-200 hover:bg-gray-800 |
| 39 | + focus:outline-none focus:ring-2 focus:ring-indigo-400 |
| 40 | + transition-colors" |
| 41 | + > |
| 42 | + Browse Conferences |
| 43 | + </Link> |
| 44 | + <Link |
| 45 | + to="/" |
| 46 | + className="rounded-md border border-gray-700 px-4 py-2 |
| 47 | + text-gray-200 hover:bg-gray-800 |
| 48 | + focus:outline-none focus:ring-2 focus:ring-indigo-400 |
| 49 | + transition-colors" |
| 50 | + > |
| 51 | + Home |
| 52 | + </Link> |
| 53 | + </div> |
| 54 | + </div> |
| 55 | + </main> |
| 56 | + |
| 57 | + <HTFooter /> |
| 58 | + </div> |
| 59 | + ); |
| 60 | +} |
0 commit comments