150d69e5ac
The public layout forced max-w-5xl on every /p page, so the tree chart was cramped. Mirror the member shell: the public layout now drops the max-width for the tree page (/p/<id>) only, giving the chart the full canvas (74vh to match the member view), while the page keeps its heading and people list in a centered max-w-5xl column. Person detail (/p/<id>/persons/<pid>) and /explore stay narrow. tsc clean; next build passes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Justin Paul <justin@jpaul.me>
22 lines
701 B
TypeScript
22 lines
701 B
TypeScript
"use client";
|
|
|
|
import { usePathname } from "next/navigation";
|
|
|
|
import { PublicHeader } from "@/components/public-header";
|
|
|
|
// Public viewing surface — no auth, no app sidebar. The tree page (/p/<id>)
|
|
// wants the whole canvas like the member tree view; the person detail page
|
|
// reads better in a centered column.
|
|
export default function PublicLayout({ children }: { children: React.ReactNode }) {
|
|
const pathname = usePathname();
|
|
const fullWidth = /^\/p\/[^/]+$/.test(pathname);
|
|
return (
|
|
<div className="min-h-screen">
|
|
<PublicHeader />
|
|
<main className={fullWidth ? "w-full px-4 py-6 md:px-6" : "mx-auto max-w-5xl px-4 py-8"}>
|
|
{children}
|
|
</main>
|
|
</div>
|
|
);
|
|
}
|