Skip to content

Commit 9d99de6

Browse files
fix: make tag count optional
1 parent 98d78a4 commit 9d99de6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

components/Tag.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { Suspense } from "react";
55

66
interface TagProps {
77
tag: string;
8-
tagCount: number;
8+
tagCount?: number;
99
disabled?: boolean;
1010
}
1111

@@ -54,7 +54,7 @@ function SuspenseTag({ tag, tagCount, disabled }: TagProps) {
5454
}`}
5555
>
5656
<span>{tag}</span>
57-
{tagCount > 1 ? (
57+
{tagCount && tagCount > 1 ? (
5858
<>
5959
<span className="median-dot">·</span>
6060
<span className="tag-count">{tagCount}</span>

0 commit comments

Comments
 (0)