From 9559a69e7ed47a06f2c8266fbb473c997afa0a4d Mon Sep 17 00:00:00 2001 From: Pierre Ferreira Date: Mon, 4 Dec 2023 11:10:09 +0100 Subject: [PATCH] ajout du bouton pour revenir sur la page de jeu apres une deconnexion :zap: --- cryptide_project/src/Pages/Lobbies.tsx | 2 +- cryptide_project/src/Pages/NewPlay.tsx | 22 +++++++++++++++++----- cryptide_project/src/Pages/Play.css | 22 +++++++++++++++------- 3 files changed, 33 insertions(+), 13 deletions(-) diff --git a/cryptide_project/src/Pages/Lobbies.tsx b/cryptide_project/src/Pages/Lobbies.tsx index 1a08cb3..591751e 100644 --- a/cryptide_project/src/Pages/Lobbies.tsx +++ b/cryptide_project/src/Pages/Lobbies.tsx @@ -56,7 +56,7 @@ function Lobbies() { ); const filteredLobbiesToShow = showAvailable - ? filteredLobbies.filter((lobby) => lobby.started == false && lobby.nbPlayer < 6) + ? filteredLobbies.filter((lobby) => lobby.started == false && lobby.nbPlayer < 6) //* retire les lobbies pleins ou commencés : filteredLobbies; diff --git a/cryptide_project/src/Pages/NewPlay.tsx b/cryptide_project/src/Pages/NewPlay.tsx index 2b1c058..3c60916 100644 --- a/cryptide_project/src/Pages/NewPlay.tsx +++ b/cryptide_project/src/Pages/NewPlay.tsx @@ -229,12 +229,26 @@ function NewPlay() { }; + + // if (goBackRoom != -1){ + // var returnVisibility = "visible" + // } + // else{ + // var returnVisibility = "hidden" + // } + + // const returnVisibility: Visibility = goBackRoom !== -1 ? "visible" : "hidden"; + + const returnVisibility: any= goBackRoom !== -1 ? "visible" : "hidden" ; + + return (
{/* Menu de boutons */} +
@@ -259,10 +273,11 @@ function NewPlay() { )} - - {goBackRoom != -1 && } + {/* {goBackRoom != -1 && } */} + +
{/* Lobbies */} @@ -271,9 +286,6 @@ function NewPlay() {
- - {/*
-
*/}
{user && ()}
diff --git a/cryptide_project/src/Pages/Play.css b/cryptide_project/src/Pages/Play.css index 3967eb6..f0a843e 100644 --- a/cryptide_project/src/Pages/Play.css +++ b/cryptide_project/src/Pages/Play.css @@ -20,12 +20,6 @@ display: flex; justify-content: center; } -/* -.MidContainer div { - display: flex; - justify-content: center; - flex-direction: column; -} */ .leftContainer{ width: 30%; @@ -75,7 +69,7 @@ .ButtonNav{ - margin: 15px 0; + margin: 15px 10px; width:200px; height: 8vh; @@ -90,6 +84,20 @@ font-size:larger; } + +.ButtonNavRejoin{ + margin: 15px 10px; + width:200px; + height: 8vh; + + color: white; + background-color: aquamarine; + + border: solid 2px rgb(40, 225, 163); + border-radius: 15px; + + font-size:larger; +} .returnDiv{ display: flex; flex-direction: column;