Workflow-App/Workflow/app/global-error.tsx
sjcoetzeesj-coder 11d0178ab1 feat: commit Workflow app source; move CIPC credentials to env
Adds the full Next.js app (app/, components/, lib/, scripts/, assets/,
docs/, Dockerfile, compose, configs) to version control.

Security:
- CIPC BizPortal customer-code logins (Login 1 + Login 3) now read
  CIPC_LOGIN1_CODE / CIPC_LOGIN1_PASSWORD / CIPC_LOGIN3_CODE /
  CIPC_LOGIN3_PASSWORD from .env.local instead of source.
- BizPortal personal login in apply-bizportal route reads
  BIZPORTAL_ID_NO / BIZPORTAL_PASSWORD.
- Added .env.example as the committed template.

.gitignore excludes .env*, node_modules, .next, logs, sqlite, Playwright
storage_state.json (live CIPC cookies), scratch dirs, client PDFs and
debug screenshots.
2026-10-18 15:21:45 +02:00

88 lines
2.3 KiB
TypeScript

"use client";
import { useEffect } from "react";
export default function GlobalError({
error,
reset,
}: {
error: Error & { digest?: string };
reset: () => void;
}) {
useEffect(() => {
console.error("Uncaught root error:", error);
}, [error]);
return (
<html lang="en">
<body
style={{
margin: 0,
background: "#f6f5f2",
color: "#20201e",
fontFamily:
"Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif",
}}
>
<main
style={{
minHeight: "100vh",
display: "grid",
placeItems: "center",
padding: "24px",
boxSizing: "border-box",
}}
>
<section
style={{
width: "min(100%, 560px)",
padding: "40px",
border: "1px solid #d8d5cf",
borderRadius: "12px",
background: "#fcfbf8",
boxSizing: "border-box",
}}
>
<p
style={{
margin: "0 0 12px",
color: "#6d6a64",
fontSize: "12px",
fontWeight: 700,
letterSpacing: "0.08em",
textTransform: "uppercase",
}}
>
Something went wrong
</p>
<h1 style={{ margin: "0 0 12px", fontSize: "28px", lineHeight: 1.2 }}>
Workflow could not start
</h1>
<p style={{ margin: "0 0 24px", color: "#6d6a64", lineHeight: 1.6 }}>
The application hit an unrecoverable error. Try loading it again.
If the problem continues, check the server console for the error
details.
</p>
<button
type="button"
onClick={reset}
style={{
border: 0,
borderRadius: "8px",
background: "#29483c",
color: "#faf9f6",
cursor: "pointer",
font: "inherit",
fontSize: "14px",
fontWeight: 700,
padding: "12px 18px",
}}
>
Try again
</button>
</section>
</main>
</body>
</html>
);
}