We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e78234c commit 345b9abCopy full SHA for 345b9ab
1 file changed
client/src/components/ui/tag-list.tsx
@@ -0,0 +1,21 @@
1
+import type { Tag } from "@/hooks/events";
2
+
3
+// this component is responsible for displaying the array of tags
4
+interface TagListProps {
5
+ tags: Tag[];
6
+}
7
8
+export default function TagList({ tags }: TagListProps) {
9
+ if (!tags.length) {
10
+ return null;
11
+ }
12
+ return (
13
+ <div className="flex flex-wrap gap-2">
14
+ {tags.map((tag) => (
15
+ <span key={tag.id} className="rounded-full bg-muted px-3 py-1 text-sm">
16
+ {tag.name}
17
+ </span>
18
+ ))}
19
+ </div>
20
+ );
21
0 commit comments