--- import type { Event, UserPublic } from '../lib/db'; import { eventKindLabel } from '../lib/format'; interface Props { event: Event | null; attendees: UserPublic[]; // confirmed (status='yes') — kept for caller compat, not rendered here confirmedCount: number; myRsvp: 'yes' | 'no' | 'interested' | null; greetingPrefix: string; // e.g. "Good afternoon, " firstName: string; memberLabel?: string | null; // e.g. "MEMBER · 001" } const { event, confirmedCount, myRsvp, greetingPrefix, firstName, memberLabel = null, } = Astro.props; function parseUtc(s: string): Date { if (/T.*[Zz]$/.test(s) || /[+-]\d{2}:?\d{2}$/.test(s)) return new Date(s); return new Date(s.replace(' ', 'T') + 'Z'); } function fmt(part: Intl.DateTimeFormatOptions, iso: string): string { return new Intl.DateTimeFormat('en-GB', { ...part, timeZone: 'Europe/Copenhagen' }).format(parseUtc(iso)); } const dayPadded = event ? String(parseUtc(event.starts_at).getUTCDate()).padStart(2, '0') : ''; const weekday = event ? fmt({ weekday: 'long' }, event.starts_at).toUpperCase() : ''; const monthShort = event ? fmt({ month: 'short' }, event.starts_at).toUpperCase() : ''; const startTime = event ? fmt({ hour: '2-digit', minute: '2-digit', hour12: false }, event.starts_at) : ''; ---
{event?.photo_url && ( )}

{greetingPrefix}{firstName}.

{memberLabel && (
{memberLabel} Founding circle
)}
{event ? (

Next gathering · {eventKindLabel(event.kind).toUpperCase()}

{weekday} {dayPadded} {monthShort} · {startTime}

{event.title}

{event.description}

{event.location}

) : (

Nothing scheduled yet — when we have something, you'll be the first to know.

)} {event && ( )}