diff --git a/web/src/components/indicators/Chip.tsx b/web/src/components/indicators/Chip.tsx index 06e905c83..e6de10057 100644 --- a/web/src/components/indicators/Chip.tsx +++ b/web/src/components/indicators/Chip.tsx @@ -1,8 +1,8 @@ import { cn } from "@/lib/utils"; import { LogSeverity } from "@/types/log"; -import { ReactNode, useMemo, useRef } from "react"; +import { ReactNode, useMemo } from "react"; import { isIOS } from "react-device-detect"; -import { CSSTransition } from "react-transition-group"; +import { AnimatePresence, motion } from "framer-motion"; type ChipProps = { className?: string; @@ -17,39 +17,31 @@ export default function Chip({ in: inProp = true, onClick, }: ChipProps) { - const nodeRef = useRef(null); - return ( - -
{ - e.stopPropagation(); + + {inProp && ( + { + e.stopPropagation(); - if (onClick) { - onClick(); - } - }} - > - {children} -
-
+ if (onClick) { + onClick(); + } + }} + > + {children} + + )} + ); }