From 00cf8655e5da4a4cc0f1c75c633d7d56e761b6de Mon Sep 17 00:00:00 2001 From: Martin Berka Date: Sun, 24 Sep 2023 08:10:48 +0200 Subject: [PATCH] Opravy eslint --- client/src/App.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/client/src/App.tsx b/client/src/App.tsx index c62a387..c2f6937 100644 --- a/client/src/App.tsx +++ b/client/src/App.tsx @@ -84,7 +84,7 @@ function App() { }).catch(e => { setFailure(true); }) - }, [dayIndex]); + }, [dayIndex, auth]); // Registrace socket eventů useEffect(() => { @@ -158,9 +158,9 @@ function App() { // Navigace mezi dny pomocí klávesových šípek const handleKeyDown = useCallback((e: any) => { - if (e.keyCode == 37 && dayIndex != null && dayIndex > 0) { + if (e.keyCode === 37 && dayIndex != null && dayIndex > 0) { handleDayChange(dayIndex - 1); - } else if (e.keyCode == 39 && dayIndex != null && dayIndex < 4) { + } else if (e.keyCode === 39 && dayIndex != null && dayIndex < 4) { handleDayChange(dayIndex + 1); } }, [dayIndex]); @@ -385,7 +385,7 @@ function App() {
- {dayIndex == null || dayIndex >= data.todayWeekIndex && <> + {(dayIndex == null || dayIndex >= data.todayWeekIndex) && <>

{`Jak to ${dayIndex == null || dayIndex === data.todayWeekIndex ? 'dnes' : 'tento den'} vidíš s obědem?`}