---
import { getCollection } from "astro:content";
import Layout from "@layouts/Layout.astro";
import { getLocale } from "astro-i18n-aut";
import { filterCollection } from "@i18n/utils";
import HeroCard from "@components/HeroCard.astro";

const locale = getLocale(Astro.url);
const pages = await getCollection("photos");
const posts = filterCollection(pages, locale);
---

<Layout title="Dude">
  {posts.map((post) => <HeroCard post={post} />)}
</Layout>
