--- import { type CollectionEntry, render } from "astro:content"; import FormattedDate from "@/components/FormattedDate.astro"; import type { HTMLTag, Polymorphic } from "astro/types"; type Props = Polymorphic<{ as: Tag }> & { note: CollectionEntry<"note">; isPreview?: boolean | undefined; }; const { as: Tag = "div", note, isPreview = false } = Astro.props; const { Content } = await render(note); ---
{ isPreview ? ( {note.data.title} ) : ( <>{note.data.title} ) }