Skip to content

Commit

Permalink
removing unnecesary function
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtsiomWB committed Dec 26, 2024
1 parent c664246 commit 9aedf54
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions weave-js/src/components/Tag/Tag.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,9 @@ export const RemovableTag: FC<RemovableTagProps> = ({
const [isTruncated, setIsTruncated] = useState(false);

useEffect(() => {
const checkTruncation = () => {
if (labelRef.current) {
setIsTruncated(isTagLabelTruncated(labelRef));
}
};
checkTruncation();
if (labelRef.current) {
setIsTruncated(isTagLabelTruncated(labelRef));
}
}, [label]);

const classes = useTagClasses({color, isInteractive: true, label});
Expand Down

0 comments on commit 9aedf54

Please sign in to comment.