20 lines
861 B
TypeScript
20 lines
861 B
TypeScript
|
|
import { ClientApp } from './client-app';
|
||
|
|
|
||
|
|
// The whole product is a client-driven SPA: project IDs and file paths are
|
||
|
|
// unbounded user input, so we route every URL through this single optional
|
||
|
|
// catch-all and let the existing client router (src/router.ts, which reads
|
||
|
|
// window.location at runtime) decide what to render.
|
||
|
|
//
|
||
|
|
// For `output: 'export'` we return a single empty `slug` so Next.js emits
|
||
|
|
// one shell HTML at out/index.html; the daemon's SPA fallback (see
|
||
|
|
// apps/daemon/src/server.ts) serves it for any unknown non-API path so deep links
|
||
|
|
// still hydrate to the right view. In dev we leave `dynamicParams` at its
|
||
|
|
// default (true) so `next dev` happily renders /projects/<id> directly.
|
||
|
|
export function generateStaticParams() {
|
||
|
|
return [{ slug: [] as string[] }];
|
||
|
|
}
|
||
|
|
|
||
|
|
export default function Page() {
|
||
|
|
return <ClientApp />;
|
||
|
|
}
|