nomadweb/frontend/src/app/compare/page.tsx
eric fd87f765c8 Close discover-decide-plan loop: matcher to trip, shareable /compare hub.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-29 02:58:40 -05:00

31 lines
935 B
TypeScript

import { Suspense } from "react";
import type { Metadata } from "next";
import { api } from "@/lib/api";
import type { Destination } from "@/lib/types";
import CompareClient from "@/components/CompareClient";
import SiteShell from "@/components/SiteShell";
export const metadata: Metadata = {
title: "城市对比 · nomadro",
description: "并排对比旅居城市费用、网速、气候与评分,决定后写入旅居计划",
};
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>
);
}