--- import Avatar from '@ui/Avatar.astro' import { people } from '@shared/lib/people' import ListGroup from '@ui/ListGroup.astro' import ListGroupItem from '@ui/ListGroupItem.astro' import ListGroupHeader from '@ui/ListGroupHeader.astro' import CardTitle from '@ui/CardTitle.astro' import commits from '@data/commits.json' import { sortBy } from '@shared/lib/string-format' const title = 'People' const commitList = commits as { description: string }[] // Sort by last_name (case-sensitive). const sorted = sortBy(people, (p) => p.last_name ?? '') let prevLetter = '' const rows = sorted.map((person, idx) => { const index = idx + 1 const firstLetter = (person.last_name ?? '').slice(0, 1) let header: string | null = null if (prevLetter !== firstLetter) { prevLetter = firstLetter header = firstLetter } return { person, header, description: commitList[index]?.description } }) ---
{title}
{ rows.map((row) => ( <> {row.header && {row.header}} {row.person.full_name}
{row.description}
)) }