Files
martials.no/src/components/projects/MyProjectsPage.astro

33 lines
740 B
Plaintext
Raw Normal View History

---
import ProjectCard from "./ProjectCard.astro"
import { type CollectionEntry } from "astro:content"
import { type NavLink } from "@/utils/linking"
interface Props {
projects: CollectionEntry<"projects">[]
}
const { projects } = Astro.props
const baseUrl: NavLink = "/projects"
---
<div class="flex flex-wrap justify-around">
{
projects.map(
({ data: { title, description, tags, heroImage, heroImageAlt }, id }) => (
<div class="my-5 px-2">
<ProjectCard
title={title}
linkTo={`${baseUrl}/${id}`}
description={description}
tags={tags}
image={heroImage}
imageAlt={heroImageAlt}
/>
</div>
),
)
}
</div>