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>
41 lines
1.1 KiB
TypeScript
41 lines
1.1 KiB
TypeScript
"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>
|
||
);
|
||
}
|