--- /** A case study's facts: employer, role, period, key numbers and tech. */ import Chip from "@gk/ui/components/Chip.astro"; import Kicker from "@gk/ui/components/Kicker.astro"; import type { Post } from "../../lib/blog.ts"; interface Props { post: Post; } const d = Astro.props.post.data; const cells = [ { label: "Employer", value: d.employer ?? "Personal project" }, d.role && { label: "Role", value: d.role }, d.period && { label: "Period", value: d.period }, ].filter((c): c is { label: string; value: string } => !!c); const facts = d.facts ?? []; ---
{ cells.map((c) => (
{c.label}
{c.value}
)) } { facts.map((f) => (
{f.label}
{f.value}
)) }
{ d.tech && d.tech.length > 0 && (
Tech
) }