Mise à jour de 'cryptide_project/src/Pages/Lobbies.tsx'
continuous-integration/drone/push Build is passing Details

pull/115/head
Thomas CHAZOT 1 year ago
parent af89e69255
commit de58aff695

@ -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");
}
};

Loading…
Cancel
Save