--- import markdownToText from "@helpers/markdownToText"; import { Card } from "./card"; import { useTranslatedPath, useTranslations } from "@i18n/utils"; import Image from "@components/Image.astro"; import type { InferEntrySchema } from "astro:content"; interface Props { post: { data: InferEntrySchema<"projects">; collection: string; id: string; body?: string; }; } const { data: { title, cover, icon }, collection, body, id, } = Astro.props.post; const translatePath = useTranslatedPath(Astro.url); const t = useTranslations(Astro.url); const link = translatePath(`/${collection}/${id.split("/")[0]}`); --- {icon && } {title} {markdownToText(body ?? "").slice(0, 200)} { cover && ( {"cover ) }