diff --git a/src/app/c/[token]/layout.tsx b/src/app/c/[token]/layout.tsx new file mode 100644 index 0000000..5a10360 --- /dev/null +++ b/src/app/c/[token]/layout.tsx @@ -0,0 +1,14 @@ +import type { Metadata } from 'next'; + +export const metadata: Metadata = { + title: 'Client Portal', + description: 'Project status dashboard', +}; + +export default function ClientLayout({ + children, +}: { + children: React.ReactNode; +}) { + return <>{children}>; +} \ No newline at end of file diff --git a/src/app/c/[token]/page.tsx b/src/app/c/[token]/page.tsx new file mode 100644 index 0000000..06c9738 --- /dev/null +++ b/src/app/c/[token]/page.tsx @@ -0,0 +1,28 @@ +import { getClientView } from '@/lib/client-view'; +import { notFound } from 'next/navigation'; + +export const revalidate = 60; // ISR: revalidate every 60 seconds + +export default async function ClientDashboard({ + params, +}: { + params: Promise<{ token: string }>; +}) { + const { token } = await params; + const view = await getClientView(token); + + if (!view) { + notFound(); + } + + return ( +
{view.client.brief}
+Token: {token}
+