import React from 'react'; import { Calendar } from 'lucide-react'; import { api, Event } from '@/lib/api'; import EventCard from '../components/EventCard'; const FALLBACK_EVENTS: Event[] = [ { id: '1', title: 'Burrowing Owl Survey Walk', date: new Date(Date.now() + 3 * 24 * 60 * 60 * 1000).toISOString(), location: 'Rotary Park, Cape Coral', description: 'Join CCFW volunteers for our monthly owl survey. Learn to identify burrows and record sighting data. All skill levels welcome.', rsvpCount: 14, capacity: 25, }, { id: '2', title: 'Habitat Restoration Day', date: new Date(Date.now() + 10 * 24 * 60 * 60 * 1000).toISOString(), location: 'Four Mile Cove, Cape Coral', description: 'Help us plant native vegetation to restore burrowing owl habitat. Gloves and tools provided. Bring water and sunscreen.', rsvpCount: 8, capacity: 20, }, { id: '3', title: 'Community Wildlife Photography Workshop', date: new Date(Date.now() + 17 * 24 * 60 * 60 * 1000).toISOString(), location: 'CCFW Conservation Center', description: 'Professional wildlife photographer workshop covering camera settings, ethics of wildlife photography, and best spots in Cape Coral.', rsvpCount: 22, capacity: 30, }, ]; async function getEvents(): Promise { try { return await api.getEvents(); } catch { return FALLBACK_EVENTS; } } export default async function EventsPage() { const events = await getEvents(); return (
Upcoming

CCFW Events

Get involved! CCFW hosts regular surveys, restoration days, and educational events for the Cape Coral community.

{events.length === 0 ? (

No upcoming events

Check back soon or follow us on social media.

) : ( events.map((e) => ) )}
); }