From 8525bc5c1250a25b68d6f4c317c601db84c6719f Mon Sep 17 00:00:00 2001 From: Martin Berka Date: Wed, 7 Jun 2023 21:08:01 +0200 Subject: [PATCH] =?UTF-8?q?Srovn=C3=A1n=C3=AD=20st=C3=AD=C5=BEnost=C3=AD?= =?UTF-8?q?=20linteru?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/src/App.tsx | 1 - client/src/Login.tsx | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/client/src/App.tsx b/client/src/App.tsx index 7527aaa..89eadda 100644 --- a/client/src/App.tsx +++ b/client/src/App.tsx @@ -115,7 +115,6 @@ function App() { const s = value.split('|'); const pizzaIndex = Number.parseInt(s[0]); const pizzaSizeIndex = Number.parseInt(s[1]); - const pizza = pizzy[pizzaIndex]; await addPizza(auth.login, pizzaIndex, pizzaSizeIndex); } } diff --git a/client/src/Login.tsx b/client/src/Login.tsx index 35966e7..64fb1b5 100644 --- a/client/src/Login.tsx +++ b/client/src/Login.tsx @@ -15,7 +15,7 @@ export default function Login() { if (length) { auth?.setLogin(loginRef.current.value); } - }, []); + }, [auth]); if (!auth || !auth.login) { return