585047da9e
Phase 4.5 (priority 4). The app is a React Router SPA behind Next static
export, which only generated `/` — so a hard load of any deep path (/cv/{slug},
/login, /career/builder/…) hit Next's client not-found before React Router
could route it. Replace the single app/page.tsx with an optional catch-all
app/[[...slug]] (server page + client shell so generateStaticParams stays
server-only) that matches every path; nginx already serves index.html for
unknown paths (try_files), so React Router now owns routing on direct load.
Also: PublicCvPage shows a friendly 404 empty state and sets the document
title. Verified live — /login and /cv/{slug} both resolve on direct navigation.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
14 lines
585 B
TypeScript
14 lines
585 B
TypeScript
"use client";
|
|
|
|
import dynamic from "next/dynamic";
|
|
|
|
// The whole app is a client-side React Router SPA whose providers read window/localStorage during
|
|
// their initial render -- ssr:false keeps Next's static prerender from ever executing any of it on
|
|
// the server. Kept in its own client module so the route's page.tsx can stay a server component
|
|
// (generateStaticParams is a server-only export and cannot live in a "use client" file).
|
|
const ClientApp = dynamic(() => import("../../src/ClientApp"), { ssr: false });
|
|
|
|
export default function ClientShell() {
|
|
return <ClientApp />;
|
|
}
|