--- import type { Project } from "@/types/types" import type { NavLink } from "@/utils/linking" import ProjectCard from "./ProjectCard.astro" import dayjs from "dayjs" interface Props { projects: ReadonlyArray } const { projects } = Astro.props const baseUrl: NavLink = "/projects" ---
{ projects .toSorted((a, b) => dayjs(a.data.updatedAt).isBefore(dayjs(b.data.updatedAt)) ? 1 : -1, ) .map( ({ data: { title, description, tags, heroImage, heroImageAlt }, id, }) => (
), ) }