SPB Git

Repository Public

global-error.tsx 1.2 KB 18 lines tsx

1"use client";23/** Last-resort error screen: rendered without the layout, so it carries its own minimal styles. */4export default function GlobalError({ reset }: { error: Error & { digest?: string }; reset: () => void }) {5  return (6    <html lang="fr-CA">7      <body style={{ margin: 0, minHeight: "100dvh", display: "grid", placeItems: "center", background: "#0b1426", color: "#f5f1e6", fontFamily: "system-ui, sans-serif", padding: "2rem" }}>8        <main role="alert" style={{ maxWidth: "34rem" }}>9          <p style={{ letterSpacing: "0.14em", textTransform: "uppercase", fontSize: "0.75rem", color: "#aeb9cc" }}>ATLAS IA · Erreur 500</p>10          <h1 style={{ fontSize: "2rem", lineHeight: 1.15 }}>Le site rencontre un problème.</h1>11          <p style={{ color: "#aeb9cc", lineHeight: 1.6 }}>La page n’a pas pu s’afficher. Vos notes et votre progression restent dans votre navigateur.</p>12          <button type="button" onClick={reset} style={{ marginTop: "1rem", padding: "0.7rem 1.3rem", borderRadius: "999px", border: 0, background: "#f5f1e6", color: "#0b1426", fontWeight: 600, fontSize: "1rem", cursor: "pointer" }}>Réessayer</button>13        </main>14      </body>15    </html>16  );17}18
Files main
Menu

Theme