Add services, videos, AI assistant, map/weather, gigs post, notifications settings, static legal pages, Google OAuth, payment router, real-user matching, newsletter, and content submission — all using nomadweb UI patterns. Co-authored-by: Cursor <cursoragent@cursor.com>
30 lines
1.0 KiB
TypeScript
30 lines
1.0 KiB
TypeScript
import type { Metadata } from "next";
|
|
import { notFound } from "next/navigation";
|
|
import SiteShell from "@/components/SiteShell";
|
|
import Link from "next/link";
|
|
import { api } from "@/lib/api";
|
|
|
|
export async function generateMetadata({ params }: { params: Promise<{ id: string }> }): Promise<Metadata> {
|
|
const { id } = await params;
|
|
const day = await api.getDigitalDay(id).catch(() => null);
|
|
return { title: day ? `${day.title} · nomadro` : "每日指南" };
|
|
}
|
|
|
|
export default async function DigitalDayPage({ params }: { params: Promise<{ id: string }> }) {
|
|
const { id } = await params;
|
|
const day = await api.getDigitalDay(id).catch(() => null);
|
|
if (!day) notFound();
|
|
return (
|
|
<SiteShell showFooter>
|
|
<div className="legal-page">
|
|
<nav className="detail-nav"><Link href="/digital">← 游民学院</Link></nav>
|
|
<article className="legal-content reveal">
|
|
<span className="section-tag">📅 DAY {id}</span>
|
|
<h1>{day.title}</h1>
|
|
<p>{day.body}</p>
|
|
</article>
|
|
</div>
|
|
</SiteShell>
|
|
);
|
|
}
|