diff --git a/apps/web/components/dashboard/tags/TagPill.tsx b/apps/web/components/dashboard/tags/TagPill.tsx index 88b88b52..5a0f9943 100644 --- a/apps/web/components/dashboard/tags/TagPill.tsx +++ b/apps/web/components/dashboard/tags/TagPill.tsx @@ -1,4 +1,4 @@ -import React from "react"; +import React, { useState } from "react"; import Link from "next/link"; import { Button } from "@/components/ui/button"; import { Separator } from "@/components/ui/separator"; @@ -22,6 +22,11 @@ export function TagPill({ count: number; isDraggable: boolean; }) { + const [isHovered, setIsHovered] = useState(false); + + const handleMouseOver = () => setIsHovered(true); + const handleMouseOut = () => setIsHovered(false); + const { mutate: mergeTag } = useMergeTag({ onSuccess: () => { toast({ @@ -62,27 +67,25 @@ export function TagPill({ }, ); - return ( - -
- - {name} {count} - + + {name} {count} + + {isHovered && ( -
+ )} + + ); + if (!isDraggable) { + return pill; + } + return ( + + {pill} ); }