Skip to content

Commit 6093bcc

Browse files
committed
feat: only show tooltip if active timer or voting is there
1 parent 83f5ccb commit 6093bcc

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
@@ -210,10 +210,10 @@ export const MenuBars = ({showPreviousColumn, showNextColumn, onPreviousColumn,
210210
setIsReadyTooltipClass("tooltip-button--content-extended");
211211
setTimeout(() => setIsReadyTooltipClass(""), 28000);
212212
};
213-
if ((timerExpired || USED_VOTES) && USER_NOT_READY) {
213+
if ((timerExpired || USED_VOTES) && USER_NOT_READY && (state.activeTimer || state.activeVoting)) {
214214
timer = setTimeout(handleTimeout, 2000);
215215
}
216-
if (!USER_NOT_READY || (!state.activeTimer && !state.activeVoting)) {
216+
if (!USER_NOT_READY || (!state.activeTimer && !state.activeVoting) || !USED_VOTES) {
217217
setIsReadyTooltipClass("");
218218
}
219219
return () => clearTimeout(timer);

0 commit comments

Comments
 (0)