1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Linter fix

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev 2022-01-19 13:00:57 +03:00
parent e4a6b4f65d
commit 2dd69cbb15

View File

@ -36,23 +36,23 @@ const NonInjectedHotbarSelector = observer(({ hotbar, hotbarManager, openCommand
function clearTimer() { function clearTimer() {
clearTimeout(tooltipTimeout.current); clearTimeout(tooltipTimeout.current);
}; }
function onTooltipShow() { function onTooltipShow() {
setTooltipVisible(true); setTooltipVisible(true);
clearTimer(); clearTimer();
tooltipTimeout.current = setTimeout(() => setTooltipVisible(false), 1500); tooltipTimeout.current = setTimeout(() => setTooltipVisible(false), 1500);
}; }
function onArrowClick(switchTo: () => void) { function onArrowClick(switchTo: () => void) {
onTooltipShow(); onTooltipShow();
switchTo(); switchTo();
}; }
function onMouseEvent(event: React.MouseEvent) { function onMouseEvent(event: React.MouseEvent) {
clearTimer(); clearTimer();
setTooltipVisible(event.type == "mouseenter"); setTooltipVisible(event.type == "mouseenter");
}; }
return ( return (
<div className={styles.HotbarSelector}> <div className={styles.HotbarSelector}>