import { format, parseISO } from 'date-fns' interface Event { date: string headline: string description: string } export function Events({ props: events }: { props: Event[] }) { return (
{events.map(event => (
{format(parseISO(event.date), 'dd LLL, yyyy')}
{event.headline}
{event.description.slice(0, 70)}...
))}
) }