diff --git a/frontend/app/p/[treeId]/page.tsx b/frontend/app/p/[treeId]/page.tsx index aa95744..6373be7 100644 --- a/frontend/app/p/[treeId]/page.tsx +++ b/frontend/app/p/[treeId]/page.tsx @@ -102,7 +102,7 @@ export default function PublicTreePage() { return (
-
+

{tree?.name}

{tree?.description &&

{tree.description}

}

@@ -110,6 +110,7 @@ export default function PublicTreePage() {

+ {/* Chart spans the full canvas (the layout removes max-width for /p/). */} {focusId && people.length > 0 && ( )} -
+

All people

- + {shown.length === 0 ? (
No matches.
diff --git a/frontend/app/p/layout.tsx b/frontend/app/p/layout.tsx index e03a460..0db3017 100644 --- a/frontend/app/p/layout.tsx +++ b/frontend/app/p/layout.tsx @@ -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/) +// 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 (
-
{children}
+
+ {children} +
); } diff --git a/frontend/components/public-tree-chart.tsx b/frontend/components/public-tree-chart.tsx index 26c380f..3ee121d 100644 --- a/frontend/components/public-tree-chart.tsx +++ b/frontend/components/public-tree-chart.tsx @@ -160,7 +160,7 @@ export function PublicTreeChart({