From de58aff69513adac798ca3af09a2acb687c8444b Mon Sep 17 00:00:00 2001 From: Thomas CHAZOT Date: Mon, 18 Dec 2023 08:50:54 +0100 Subject: [PATCH] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'cryptide=5Fproject?= =?UTF-8?q?/src/Pages/Lobbies.tsx'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cryptide_project/src/Pages/Lobbies.tsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/cryptide_project/src/Pages/Lobbies.tsx b/cryptide_project/src/Pages/Lobbies.tsx index ca97c3c..0b448d1 100644 --- a/cryptide_project/src/Pages/Lobbies.tsx +++ b/cryptide_project/src/Pages/Lobbies.tsx @@ -28,7 +28,7 @@ class LobbyDataProps { } } -// let cptNavigation = 0 +let cptNavigation = 0 function Lobbies() { const theme=useTheme(); @@ -42,7 +42,6 @@ function Lobbies() { const [showAvailable, setShowAvailable] = useState(true); - const [cptNavigation, setCptNavigation] = useState(0); const handleShowAllClick = () => { setShowAvailable(false); @@ -58,9 +57,9 @@ function Lobbies() { }; const handleSetCptNavigation = () => { - setCptNavigation((prevCpt) => prevCpt + 1); + cptNavigation++ - if (cptNavigation % 2 === 0 && navigationType.toString() === "POP") { + if (cptNavigation % 2 >= 0 && navigationType.toString() === "POP") { socket.emit("player quit"); } };