--- import type { CollectionEntry } from "astro:content"; import { Icon } from "astro-icon/components"; import { formatDate, readingTime } from "@/lib/utils"; type Props = { entry: CollectionEntry<"projects"> | CollectionEntry<"blog">; }; const { entry } = Astro.props; const { collection, data, body } = entry; const { title, summary, date } = data; const demoUrl = collection === "projects" ? data.demoUrl : null; const repoUrl = collection === "projects" ? data.repoUrl : null; ---
Back to {collection}
{formatDate(date)}
{readingTime(body ?? "")}

{title}

{summary}
{ (demoUrl || repoUrl) && (
{demoUrl && ( See Demo )} {repoUrl && ( See Repository )}
) }