/* ═══════════════════════════════════════════════════════════════ TEAM DETAIL — /teams/:id teams.id is a global primary key rather than scoped to the organization, which is what lets this route be flat: 'ngu-board' can only mean one thing site-wide. The roster is not in this page's data. PeopleTiles fetches /teams/:id/people itself, off v_org_leadership, which already decides who counts as current and public. Two requests, both cached for 60s by api.ts, and one set of visibility rules. ═══════════════════════════════════════════════════════════════ */ import { Link, useParams } from 'react-router-dom' import PageShell from '../components/PageShell.tsx' import PageState from '../components/PageState.tsx' import PlatformIcon from '../components/PlatformIcon.tsx' import ContentBlocks from '../components/ContentBlocks.tsx' import PeopleTiles from '../components/PeopleTiles.tsx' import { useTeam } from '../lib/useContent.ts' import { orgHref } from '../lib/hrefs.ts' const TEAL = '#138ba0' const BODY = '#4a6b72' export default function TeamDetail() { const { id } = useParams() const { data: team, loading, error, notFound, reload } = useTeam(id) if (!team) { return ( ) } const accent = team.color || TEAL const hasAbout = team.description.length > 0 || team.blocks.length > 0 || team.links.length > 0 const sections: any[] = [] if (hasAbout) { sections.push({ id: 'about', title: 'About', accent, background: '#ffffff', content: (
{team.description.map((paragraph, index) => (

{paragraph}

))}
{team.links.length > 0 && (
{team.links.map((link) => ( {link.label} ))}
)}
), }) } sections.push({ id: 'members', title: hasAbout ? 'Members' : team.name, accent, background: hasAbout ? '#eef9fb' : '#ffffff', content: (
{!hasAbout && ( )}
), }) return ( ) } function Facts({ orgId, orgKind, orgName, accent, }: { orgId: string orgKind?: string | null orgName: string accent: string }) { return (
A team of{' '} {orgName} Back to {orgName}
) }