fix: fix type errors
This commit is contained in:
parent
dde7835dd7
commit
559a324ae5
3 changed files with 3 additions and 3 deletions
|
|
@ -16,7 +16,7 @@ interface Props {
|
||||||
published: Date;
|
published: Date;
|
||||||
updated?: Date;
|
updated?: Date;
|
||||||
tags: string[];
|
tags: string[];
|
||||||
category: string;
|
category: string | null;
|
||||||
image: string;
|
image: string;
|
||||||
description: string;
|
description: string;
|
||||||
draft: boolean;
|
draft: boolean;
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ interface Props {
|
||||||
published: Date;
|
published: Date;
|
||||||
updated?: Date;
|
updated?: Date;
|
||||||
tags: string[];
|
tags: string[];
|
||||||
category: string;
|
category: string | null;
|
||||||
hideTagsForMobile?: boolean;
|
hideTagsForMobile?: boolean;
|
||||||
hideUpdateDate?: boolean;
|
hideUpdateDate?: boolean;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ export function getTagUrl(tag: string): string {
|
||||||
return url(`/archive/?tag=${encodeURIComponent(tag.trim())}`);
|
return url(`/archive/?tag=${encodeURIComponent(tag.trim())}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getCategoryUrl(category: string): string {
|
export function getCategoryUrl(category: string | null): string {
|
||||||
if (
|
if (
|
||||||
!category ||
|
!category ||
|
||||||
category.trim() === "" ||
|
category.trim() === "" ||
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue