Vollstaendige Next.js/Prisma-E-Commerce-Anwendung fuer eine Imkerei: Shop, Warenkorb, Stripe-Checkout, Kundenkonto mit 2FA, Admin-Bereich (Produkte, Ernten, Chargen, Bestellungen, Gutscheine, admin-editierbare Website-Inhalte), i18n (DE/EN), Rate-Limiting/CSP/Audit-Log-Haertung, PostgreSQL- und MySQL-Unterstuetzung ueber austauschbare Prisma- Treiber-Adapter, Unit-/Komponenten-/E2E-Tests.
58 lines
1.6 KiB
TypeScript
58 lines
1.6 KiB
TypeScript
"use client";
|
|
|
|
import { useEffect } from "react";
|
|
|
|
export default function GlobalError({
|
|
error,
|
|
reset,
|
|
}: {
|
|
error: Error & { digest?: string };
|
|
reset: () => void;
|
|
}) {
|
|
useEffect(() => {
|
|
console.error(error);
|
|
}, [error]);
|
|
|
|
return (
|
|
<html lang="de">
|
|
<body style={{ margin: 0, fontFamily: "Arial, Helvetica, sans-serif", background: "#FAF8F3", color: "#242424" }}>
|
|
<div
|
|
style={{
|
|
minHeight: "100vh",
|
|
display: "flex",
|
|
alignItems: "center",
|
|
justifyContent: "center",
|
|
padding: "2rem",
|
|
}}
|
|
>
|
|
<div style={{ textAlign: "center", maxWidth: "28rem" }}>
|
|
<p style={{ fontSize: "0.75rem", letterSpacing: "0.1em", color: "#B88A44", marginBottom: "0.75rem" }}>
|
|
FEHLER
|
|
</p>
|
|
<h1 style={{ fontSize: "1.75rem", color: "#24352B", margin: 0 }}>Etwas ist schiefgelaufen.</h1>
|
|
<p style={{ marginTop: "1rem", color: "#555", lineHeight: 1.6 }}>
|
|
Bitte lade die Seite neu oder versuche es später erneut.
|
|
</p>
|
|
<button
|
|
type="button"
|
|
onClick={() => reset()}
|
|
style={{
|
|
marginTop: "2rem",
|
|
padding: "0.75rem 1.75rem",
|
|
background: "#24352B",
|
|
color: "#F4EFE5",
|
|
border: "none",
|
|
fontSize: "0.875rem",
|
|
letterSpacing: "0.05em",
|
|
cursor: "pointer",
|
|
}}
|
|
>
|
|
ERNEUT VERSUCHEN
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|