fix du css, et du pb dans lobby 🚑
continuous-integration/drone/push Build is passing Details

pull/110/head
Pierre Ferreira 7 months ago
parent 5d89f8e1bd
commit f88e8e66b4

@ -4,7 +4,6 @@
/* background-color: #D7D4C6; */
background-color: #fff;
min-height: 100vh;
display: flex;
font-size: calc(10px + 2vmin);
/* color: #2A4541; */
}

@ -42,7 +42,7 @@ function Lobbies() {
const [showAvailable, setShowAvailable] = useState(true);
const [cptNavigation, setCptNavigation] = useState(0);
const [cptNavigation, setCptNavigation] = useState(0);
const handleShowAllClick = () => {
setShowAvailable(false);
@ -56,10 +56,9 @@ function Lobbies() {
setFirst(false);
socket.emit("request lobbies");
};
const handleSetCptNavigation = () => {
setCptNavigation((prevCpt) => prevCpt + 1);
const navigationType = useNavigationType();
if (cptNavigation % 2 === 0 && navigationType.toString() === "POP") {
socket.emit("player quit");
@ -73,25 +72,25 @@ function Lobbies() {
const filteredLobbiesToShow = showAvailable
? filteredLobbies.filter((lobby) => lobby.started == false && lobby.nbPlayer < 6) //* retire les lobbies pleins ou commencés
: filteredLobbies;
const setFirstData = (first: boolean) => {
setFirst(first)
}
const navigationType = useNavigationType()
const navigationType = useNavigationType();
handleSetCptNavigation();
if (first){
handleSetFirst();
}
useEffect(() => {
socket.on("request lobbies", (map) => {
const jsonMap = JSON.parse(map)

Loading…
Cancel
Save