SPB Git

Repository Public

not-found.tsx 1.7 KB 27 lines tsx

1import Link from "next/link";2import { getLocale } from "@/i18n/server";3import { dict } from "@/i18n/dict";4import { SiteChrome } from "@/components/site/chrome";56const T = dict({7  code: ["Erreur 404", "Error 404"], title: ["Cette page n’existe pas", "This page does not exist"],8  text: ["La fiche a peut-être été déplacée ou retirée. La recherche retrouve souvent ce que l’on cherchait.", "The sheet may have moved or been withdrawn. Search often finds what you were looking for."],9  home: ["Retour à l’accueil", "Back to the home page"], search: ["Chercher une fiche", "Search the sheets"],10});11export default async function NotFound() {12  const locale = await getLocale(); const t = T(locale);13  return (14    <SiteChrome locale={locale}>15      <div className="mx-auto max-w-[640px] py-20 text-center safe-x">16        <svg viewBox="0 0 240 120" className="mx-auto h-28 text-line" aria-hidden="true" fill="none" stroke="currentColor" strokeWidth="2">17          <rect x="70" y="14" width="100" height="92" rx="10" /><path d="M92 44h56M92 62h56M92 80h30" strokeLinecap="round" /><circle cx="176" cy="92" r="20" fill="var(--ui-paper)" stroke="var(--ui-accent)" /><path d="m190 106 14 12" stroke="var(--ui-accent)" strokeLinecap="round" />18        </svg>19        <p className="eyebrow mt-6">{t.code}</p>20        <h1 className="mt-2 font-display text-4xl font-semibold tracking-tight">{t.title}</h1>21        <p className="mt-4 text-lg leading-relaxed text-muted">{t.text}</p>22        <div className="mt-8 flex flex-wrap justify-center gap-3"><Link className="btn btn-primary" href="/">{t.home}</Link><Link className="btn" href="/search">{t.search}</Link></div>23      </div>24    </SiteChrome>25  );26}27
Files main
Menu

Theme