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>
42 lines
1.3 KiB
TypeScript
42 lines
1.3 KiB
TypeScript
import { Suspense } from "react";
|
|
import type { Metadata } from "next";
|
|
import { api } from "@community/lib/api";
|
|
import type { Destination } from "@community/lib/types";
|
|
import CompareClient from "@community/components/CompareClient";
|
|
import SiteShell from "@community/components/SiteShell";
|
|
|
|
export const metadata: Metadata = {
|
|
title: "城市对比 · nomadro",
|
|
description: "并排对比旅居城市费用、网速、气候与评分,决定后写入旅居计划",
|
|
openGraph: {
|
|
title: "城市对比台 · nomadro",
|
|
description: "最多 4 城并排对比,推荐城一键写入旅居计划",
|
|
url: "/compare",
|
|
type: "website",
|
|
},
|
|
twitter: {
|
|
card: "summary_large_image",
|
|
title: "城市对比台 · nomadro",
|
|
description: "最多 4 城并排对比,推荐城一键写入旅居计划",
|
|
},
|
|
};
|
|
|
|
export const revalidate = 60;
|
|
|
|
export default async function ComparePage() {
|
|
let destinations: Destination[] = [];
|
|
try {
|
|
destinations = await api.getDestinations();
|
|
} catch {
|
|
destinations = [];
|
|
}
|
|
|
|
return (
|
|
<SiteShell showFooter>
|
|
<Suspense fallback={<div className="compare-page"><div className="container"><p className="plan-loading">加载对比台…</p></div></div>}>
|
|
<CompareClient destinations={destinations} />
|
|
</Suspense>
|
|
</SiteShell>
|
|
);
|
|
}
|