diff --git a/src/components/blog/Hero.astro b/src/components/blog/Hero.astro index 5a409e5..b33eb5e 100644 --- a/src/components/blog/Hero.astro +++ b/src/components/blog/Hero.astro @@ -1,7 +1,7 @@ --- import { Image } from "astro:assets"; -import { getFormattedDate } from "@/utils"; import type { CollectionEntry } from "astro:content"; +import FormattedDate from "../FormattedDate.astro"; interface Props { content: CollectionEntry<"post">; @@ -10,15 +10,6 @@ interface Props { const { content: { data }, } = Astro.props; - -const datetime = data.publishDate.toISOString(); -const postDate = getFormattedDate(data.publishDate, { month: "long" }); - -const hasBeenUpdated = typeof data.updatedDate !== "undefined"; -const updatedDatetime = data.updatedDate?.toISOString(); -const updatedPostDate = hasBeenUpdated - ? getFormattedDate(data.updatedDate as Date, { month: "long" }) - : null; --- { @@ -35,14 +26,12 @@ const updatedPostDate = hasBeenUpdated ) }
{post.data.description}} diff --git a/src/data/shared.ts b/src/data/shared.ts index 5a56779..0560830 100644 --- a/src/data/shared.ts +++ b/src/data/shared.ts @@ -1,11 +1,7 @@ -interface IElement { - readonly as?: keyof HTMLElementTagNameMap; -} - interface PaginationLink { url: string; text?: string; srLabel?: string; } -export type { IElement, PaginationLink }; +export type { PaginationLink };