--- // person = people[person-id] (no -1: the object is passed straight to Avatar). import Avatar from '@ui/Avatar.astro' import people from '@data/people.json' interface Person { full_name?: string job_title?: string photo?: string [key: string]: unknown } interface Props { personId?: number right?: boolean } const { personId = 0, right } = Astro.props const person = (people as Person[])[personId] ---
{ !right && (
) }
{person.full_name}
{person.job_title}
{ right && (
) }