fix bug sonar 1
continuous-integration/drone/push Build is passing Details

pull/110/head
Pierre Ferreira 1 year ago
parent 50092b31d6
commit 927bb1ff6b

@ -28,7 +28,7 @@ class LobbyDataProps {
} }
} }
let cptNavigation = 0 // let cptNavigation = 0
function Lobbies() { function Lobbies() {
const theme=useTheme(); const theme=useTheme();
@ -42,6 +42,8 @@ function Lobbies() {
const [showAvailable, setShowAvailable] = useState(true); const [showAvailable, setShowAvailable] = useState(true);
const [cptNavigation, setCptNavigation] = useState(0);
const handleShowAllClick = () => { const handleShowAllClick = () => {
setShowAvailable(false); setShowAvailable(false);
}; };
@ -67,7 +69,7 @@ function Lobbies() {
} }
const navigationType = useNavigationType() const navigationType = useNavigationType()
cptNavigation++ setCptNavigation((prevCpt) => prevCpt + 1);
if (cptNavigation % 2 == 0){ if (cptNavigation % 2 == 0){
if (navigationType.toString() == "POP"){ if (navigationType.toString() == "POP"){
socket.emit("player quit") socket.emit("player quit")

Loading…
Cancel
Save