import PageShell from "../components/PageShell.tsx"; import { sitePage } from "../lib/site.ts"; import HistoryTimeline from "./sections/history/HistoryTimeline.tsx"; import { HISTORY_DECADES } from "../data/historyDecades.ts"; import { useHistory } from "../lib/useHistory.ts"; import { BRAND } from "../lib/color.ts" /* Title and intro: site.json, which also gives the search metadata. */ const PAGE = sitePage("/history"); /** * Year the program starts. Decades ending before this render with the * pre-program treatment, so the gap moves if the founding date is ever * corrected, no hardcoded 2000 anywhere in the components. */ const PROGRAM_START_YEAR = 2000; const BACKGROUND = "var(--color-surface)"; export default function History() { const { items, loading, error, reload } = useHistory(); // Section renders `content` outside its own max-width wrapper, so the // container lives here. The custom properties bind the timeline to // this section's accent and background, --tl-surface must match // `background` or the rail will show through the year dots. const wrap = (children: React.ReactNode) => (
Loading the timeline…
, ); } else if (error) { // Say what failed and offer the one action that might fix it. // A history page that silently renders nothing looks like an // organization with no history. content = wrap(Couldn’t load the timeline. {error}