import { MapPin, Clock, ArrowRight, CalendarPlus } from "lucide-react"; import Link from "next/link"; interface MeetupData { id?: string; title: string; date: string; time?: string; location?: string; link?: string; description?: string; } interface MeetupsSectionProps { meetups: MeetupData[]; } function formatMeetupDate(dateStr: string) { const d = new Date(dateStr); return { month: d.toLocaleString("en-US", { month: "short" }).toUpperCase(), day: String(d.getDate()), full: d.toLocaleString("en-US", { weekday: "long", month: "long", day: "numeric", year: "numeric" }), }; } export function MeetupsSection({ meetups }: MeetupsSectionProps) { return (

Mark your calendar

Upcoming Meetups

Add to Calendar All events
{meetups.length === 0 ? (

No upcoming meetups scheduled. Check back soon.

) : (
{meetups.map((meetup, i) => { const { month, day, full } = formatMeetupDate(meetup.date); const href = meetup.id ? `/events/${meetup.id}` : "#upcoming-meetups"; return (
{month} {day}

{meetup.title}

{full}

{meetup.description && (

{meetup.description}

)}
{meetup.location && (

{meetup.location}

)} {meetup.time && (

{meetup.time}

)}
View Details ); })}
)}
All events Add to Calendar
); }