---
import BaseLayout from '../../layouts/BaseLayout.astro';
import EventsList from '../../components/EventsList.astro';
import { getEvents } from '../../lib/directus';
import { getUpcomingEvents } from '../../lib/events';

const events = getUpcomingEvents(await getEvents());
---

<BaseLayout title="Events" description="Airport events and flying opportunities.">
  <div class="container">
    <EventsList events={events} title="Upcoming Events" description="What's coming up at the airport" />
  </div>
</BaseLayout>
