Public tree view: full-width canvas like the member view
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>
This commit is contained in:
@@ -1,11 +1,21 @@
|
||||
"use client";
|
||||
|
||||
import { usePathname } from "next/navigation";
|
||||
|
||||
import { PublicHeader } from "@/components/public-header";
|
||||
|
||||
// Public viewing surface — no auth, no app sidebar. A slim header only.
|
||||
// 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="mx-auto max-w-5xl px-4 py-8">{children}</main>
|
||||
<main className={fullWidth ? "w-full px-4 py-6 md:px-6" : "mx-auto max-w-5xl px-4 py-8"}>
|
||||
{children}
|
||||
</main>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user