- Remove stale deploy/docker-entrypoint.sh (Dockerfile copies root version) - Remove scripts/seed.ts (superseded by seed.mjs) - Add src/app/error.tsx and global-error.tsx (untracked error boundaries) - Gitignore deploy/.prod/ for synced production configs - Add scripts/sync-prod.ps1 to pull compose/env/Caddyfile from valhalla - Add scripts/apply-compose.ps1 to push compose changes and restart services
30 lines
651 B
TypeScript
30 lines
651 B
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>
|
|
<body className="flex min-h-screen flex-col items-center justify-center gap-4 p-8">
|
|
<h2 className="text-xl font-semibold">Something went wrong</h2>
|
|
<button
|
|
onClick={reset}
|
|
className="rounded-md bg-primary px-4 py-2 text-sm text-primary-foreground hover:bg-primary/90"
|
|
>
|
|
Try again
|
|
</button>
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|