)
}
function Generation({ entries, ancestors }) {
return (
{entries.map(({ path, slot, label }) => (
))}
)
}
// `generations` controls how many ancestor columns to render. The detail page
// uses 2 (parents + grandparents) to keep the inline tree compact; the full
// 3-generation tree lives on the dedicated print page.
function PedigreeTreeReadOnly({ subjectName, ancestors, generations = 3 }) {
// Each generation column is ~176px (incl. gap); narrower min-width for fewer
// generations lets the tree fit its column without horizontal scrolling.
const minWidth = generations >= 3 ? 720 : 544
return (
// The scroll container fills (and shrinks with) its column; the tree scrolls
// horizontally inside it rather than forcing the page wider and pushing the
// timeline column off-screen.