Files
sistem-desa-mandiri/src/app/global-error.tsx
bipproduction 5230a31942 fix: add custom 404 and global error pages for Docker build
Create not-found.tsx and global-error.tsx to prevent Next.js from
falling back to legacy Pages Router _error pages during static
generation, which fail with useContext null in Docker.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 11:28:37 +08:00

42 lines
892 B
TypeScript

"use client";
export default function GlobalError({
reset,
}: {
error: Error & { digest?: string };
reset: () => void;
}) {
return (
<html lang="en">
<body
style={{
backgroundColor: "#252A2F",
display: "flex",
flexDirection: "column",
alignItems: "center",
justifyContent: "center",
minHeight: "100vh",
gap: 16,
fontFamily: "Lato, sans-serif",
color: "white",
}}
>
<h2>Terjadi Kesalahan</h2>
<button
onClick={() => reset()}
style={{
padding: "8px 16px",
borderRadius: 4,
border: "1px solid #ccc",
background: "transparent",
color: "white",
cursor: "pointer",
}}
>
Coba Lagi
</button>
</body>
</html>
);
}