caelum0x d56639a594
Some checks failed
build-images / web (push) Has been cancelled
vision2026-ci / Python SDK resource tests (push) Has been cancelled
build-images / api (push) Has been cancelled
build-images / worker-gpu (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (comfy-workflow-schema) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (effects-core) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (eventbus-types) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (growth-analytics) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (provider-adapter-kit) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (publishing-connectors) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (render-core) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (shot-template-schema) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (trends-schema) (push) Has been cancelled
vision2026-ci / Desktop engine crates (test + clippy + fmt) (push) Has been cancelled
codeql / Analyze (javascript-typescript) (push) Has been cancelled
codeql / Analyze (python) (push) Has been cancelled
perf / API hot-path micro-smoke (budgeted) (push) Has been cancelled
perf / Desktop engine crates (release build check) (push) Has been cancelled
vision2026-ci / API phase modules (ruff + pytest) (push) Has been cancelled
vision2026-ci / Alembic upgrade + drift check (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (caption-engine) (push) Has been cancelled
Menivor — open source release (MIT), free to use and fork
Paid, hosted product at menivor.com, now retired as a company project.
Fresh squashed history of the cleaned working tree (secret-scanned,
no .env, no customer data, no outreach logs). Built on
MoneyPrinterTurbo (MIT, harry0703) — see NOTICE.
2026-12-04 02:10:26 +03:00

56 lines
1.9 KiB
TypeScript

"use client";
import * as React from "react";
import Link from "next/link";
import { AlertTriangle, RefreshCw } from "lucide-react";
import { Button } from "@/components/ui/button";
interface RouteErrorProps {
readonly error: Error & { digest?: string };
readonly reset: () => void;
/** Section name for the heading, e.g. "your inbox". Omit for a generic page. */
readonly section?: string;
}
/**
* Shared route-segment error state: an unexpected failure while rendering or
* loading a section shows a recoverable screen instead of a blank one. The
* error is logged to the console; the digest (server errors) is shown so
* support can find the matching log line.
*/
export function RouteError({ error, reset, section }: RouteErrorProps) {
React.useEffect(() => {
console.error(`[menivor] route error${section ? ` (${section})` : ""}`, error);
}, [error, section]);
return (
<main className="container flex min-h-[60dvh] flex-col items-start justify-center gap-4 py-20">
<AlertTriangle className="h-8 w-8 text-destructive" aria-hidden />
<h1 className="text-2xl font-bold tracking-tight">
{section ? `We couldn't load ${section}` : "Something went wrong on this page"}
</h1>
<p className="max-w-lg text-muted-foreground">
Your reels and credits are safe. Try again, and if it keeps happening contact support
{error.digest ? (
<>
{" "}with reference <code className="font-mono text-xs">{error.digest}</code>
</>
) : null}
.
</p>
<div className="flex flex-wrap gap-2">
<Button onClick={reset}>
<RefreshCw className="mr-2 h-4 w-4" aria-hidden /> Try again
</Button>
<Button asChild variant="outline">
<Link href="/reels">My reels</Link>
</Button>
<Button asChild variant="ghost">
<Link href="/contact">Contact support</Link>
</Button>
</div>
</main>
);
}