fix(ui): queue count badge showing up multiple times

This commit is contained in:
psychedelicious
2025-06-26 17:02:45 +10:00
parent 4612f0ac50
commit df6e67c982

View File

@@ -35,6 +35,11 @@ export const QueueCountBadge = memo(({ targetRef }: Props) => {
return;
}
const { x, y } = target.getBoundingClientRect();
if (x === 0 || y === 0) {
// If the target is not visible, do not show the badge
setBadgePos(null);
return;
}
setBadgePos({ x: `${x - 7}px`, y: `${y - 5}px` });
};