diff --git a/src/components/PostCard.astro b/src/components/PostCard.astro index a698948d..4546ce40 100644 --- a/src/components/PostCard.astro +++ b/src/components/PostCard.astro @@ -16,7 +16,7 @@ interface Props { published: Date; updated?: Date; tags: string[]; - category: string; + category: string | null; image: string; description: string; draft: boolean; diff --git a/src/components/PostMeta.astro b/src/components/PostMeta.astro index 4832d4d7..488e85eb 100644 --- a/src/components/PostMeta.astro +++ b/src/components/PostMeta.astro @@ -10,7 +10,7 @@ interface Props { published: Date; updated?: Date; tags: string[]; - category: string; + category: string | null; hideTagsForMobile?: boolean; hideUpdateDate?: boolean; } diff --git a/src/utils/url-utils.ts b/src/utils/url-utils.ts index 6b9b9073..956050bb 100644 --- a/src/utils/url-utils.ts +++ b/src/utils/url-utils.ts @@ -21,7 +21,7 @@ export function getTagUrl(tag: string): string { return url(`/archive/?tag=${encodeURIComponent(tag.trim())}`); } -export function getCategoryUrl(category: string): string { +export function getCategoryUrl(category: string | null): string { if ( !category || category.trim() === "" ||