nomadro/app/community/page.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

61 lines
1.6 KiB
TypeScript

import { api } from "@community/lib/api";
import HomeClient from "@community/components/HomeClient";
export const revalidate = 60;
export default async function Home() {
try {
const [stats, ticker, destinations, visas, faqs, testimonials, tools, blog, cost, speed, growth, radar] =
await Promise.all([
api.getStats(),
api.getTicker(),
api.getDestinations(),
api.getVisas(),
api.getFaqs(),
api.getTestimonials(),
api.getTools(),
api.getBlog(),
api.getChartCost(),
api.getChartSpeed(),
api.getChartGrowth(),
api.getChartRadar(),
]);
return (
<HomeClient
stats={stats}
ticker={ticker.messages}
destinations={destinations}
visas={visas}
faqs={faqs}
testimonials={testimonials}
tools={tools}
blog={blog}
charts={{ cost, speed, growth, radar }}
/>
);
} catch {
// Minimal fallback if API completely unavailable
const stats = await api.getStats();
const ticker = await api.getTicker();
return (
<HomeClient
stats={stats}
ticker={ticker.messages}
destinations={[]}
visas={[]}
faqs={[]}
testimonials={[]}
tools={[]}
blog={[]}
charts={{
cost: { labels: [], datasets: [{ data: [] }] },
speed: { labels: [], datasets: [{ data: [] }] },
growth: { labels: [], datasets: [{ data: [] }] },
radar: { labels: [], datasets: [] },
}}
/>
);
}
}