nomadro/app/community/error.tsx
eric 9928c5185b Mount nav/book/community as native App Router routes in one Next process.
Replace reverse-proxy/iframe approach with @ebook/@community/@navmini imports under /nav /book /community so localhost:3000 serves all three products directly.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-28 03:49:16 -05:00

41 lines
1.1 KiB
TypeScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"use client";
import { useEffect } from "react";
import Link from "next/link";
import SiteShell from "@community/components/SiteShell";
export default function GlobalError({
error,
reset,
}: {
error: Error & { digest?: string };
reset: () => void;
}) {
useEffect(() => {
console.error(error);
}, [error]);
return (
<SiteShell showFooter>
<div className="not-found-page">
<h1 className="not-found-title" style={{ fontSize: "2.5rem" }}>
出错了
</h1>
<p>页面暂时无法加载,可以重试或换一条航线</p>
<p className="not-found-sub">{error.digest ? `参考码 ${error.digest}` : "请稍后再试"}</p>
<div className="not-found-actions">
<button type="button" className="btn btn-primary" onClick={reset}>
重试
</button>
<Link href="/community" className="btn">
首页
</Link>
<Link href="/community/feedback" className="btn btn-ghost">
反馈问题
</Link>
</div>
</div>
</SiteShell>
);
}