--- import type { DateFormat } from "./Intro.astro"; interface Props { date: Date; dateFormat?: DateFormat; class?: string; } const { date, dateFormat, class: className, ...props } = Astro.props; let formatted; if (dateFormat) { formatted = dateFormat(date); } else { formatted = date.toLocaleDateString("en-uk", { year: "numeric", month: "short", day: "numeric", }); } ---