Skip to content

Commit 311c9e1

Browse files
conditionally add a key to BlogTags/Tag
1 parent 8991a7f commit 311c9e1

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/components/blog-page/blog-tags.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,12 @@ export function BlogTags({
2525
}
2626

2727
const tagElement = (
28-
<Tag className={opaque ? "bg-neu-0" : ""} color={color}>
28+
// conditionally add a key here to avoid react list key errors
29+
<Tag
30+
key={!links ? tag : undefined}
31+
className={opaque ? "bg-neu-0" : ""}
32+
color={color}
33+
>
2934
{tag.replaceAll("-", " ")}
3035
</Tag>
3136
)

0 commit comments

Comments
 (0)