---
import BaseLayout from '../../layouts/BaseLayout.astro';
import NewsFeed from '../../components/NewsFeed.astro';
import { getNews } from '../../lib/directus';

const news = (await getNews()).sort((left, right) => new Date(right.publish_date).getTime() - new Date(left.publish_date).getTime());
---

<BaseLayout title="News" description="Latest airport news and operational updates.">
  <div class="container">
    <NewsFeed news={news} title="All news" description="Read the latest public updates and operational announcements." />
  </div>
</BaseLayout>
