Skip to content

Commit 83f5ccb

Browse files
committed
feat: close the tooltip if no voting or timer is active
1 parent 80710e1 commit 83f5ccb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/MenuBars/MenuBars.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,11 +213,11 @@ export const MenuBars = ({showPreviousColumn, showNextColumn, onPreviousColumn,
213213
if ((timerExpired || USED_VOTES) && USER_NOT_READY) {
214214
timer = setTimeout(handleTimeout, 2000);
215215
}
216-
if (!USER_NOT_READY) {
216+
if (!USER_NOT_READY || (!state.activeTimer && !state.activeVoting)) {
217217
setIsReadyTooltipClass("");
218218
}
219219
return () => clearTimeout(timer);
220-
}, [timerExpired, USER_NOT_READY, state.timerEnd, USED_VOTES]);
220+
}, [timerExpired, USER_NOT_READY, state.timerEnd, USED_VOTES, state.activeTimer, state.activeVoting]);
221221

222222
return (
223223
<>

0 commit comments

Comments
 (0)