+
@@ -104,17 +123,32 @@ const LobbyContainer: React.FC
= ({roomNum, HeadPlayer, nbP
{nbPlayer}/6
-
+
+ {/* Modals */}
+
- Salle pleine
+ Salle pleine
La salle est pleine, il est impossible d'y aller pour le moment !
-
- Ok
-
+
+ Ok
+
+
+
+
+ La partie a déjà commencée
+
+ La partie a déjà commencée, il est impossible d'y aller pour le moment !
+
+
+ Ok
+
+
+
+
);
diff --git a/cryptide_project/src/Pages/Lobbies.tsx b/cryptide_project/src/Pages/Lobbies.tsx
index d074e6f..6ab90c2 100644
--- a/cryptide_project/src/Pages/Lobbies.tsx
+++ b/cryptide_project/src/Pages/Lobbies.tsx
@@ -36,14 +36,15 @@ function Lobbies() {
const [searchTerm, setSearchTerm] = useState('');
- const [showAvailable, setShowAvailable] = useState(true);
+ const [showAvailable, setShowAvailable] = useState(false);
const filteredLobbies = lobbyData.filter((lobby) =>
lobby.roomNum.toLowerCase().includes(searchTerm.toLowerCase()) ||
lobby.headPlayer.pseudo.toLowerCase().includes(searchTerm.toLowerCase())
);
+
const filteredLobbiesToShow = showAvailable
- ? filteredLobbies.filter((lobby) => lobby.nbPlayer%2 == 0)
+ ? filteredLobbies.filter((lobby) => lobby.started == false)
: filteredLobbies;
@@ -81,14 +82,6 @@ function Lobbies() {
value={searchTerm}
onChange={(e) => setSearchTerm(e.target.value)}
/>
-
- Afficher disponibles
- setShowAvailable(!showAvailable)}
- />
-
))}