ajout du bouton pour revenir sur la page de jeu apres une deconnexion
continuous-integration/drone/push Build is passing Details

pull/96/head
Pierre Ferreira 1 year ago
parent d88c8281b3
commit 9559a69e7e

@ -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;

@ -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 (
<div className="MainContainer">
<div className="NewleftContainer">
{/* Menu de boutons */}
<div className='NewbuttonGroupVertical'>
<button onClick={launchMastermind} className="ButtonNav" style={{backgroundColor: theme.colors.primary, borderColor: theme.colors.secondary}}> Jouer seul </button>
@ -259,10 +273,11 @@ function NewPlay() {
)}
</Overlay>
<button onClick={createLobby} className="ButtonNav" style={{backgroundColor: theme.colors.primary, borderColor: theme.colors.secondary}}> Créer une partie </button>
<button onClick= {() => navigate("/join")} className="ButtonNav" style={{backgroundColor: theme.colors.primary, borderColor: theme.colors.secondary}}> Rejoindre </button>
{goBackRoom != -1 && <button onClick={goBack} className="ButtonNav" style={{backgroundColor: theme.colors.primary, borderColor: theme.colors.secondary}}>Retourner à la partie</button>}
{/* {goBackRoom != -1 && <button onClick={goBack} className="ButtonNav" style={{backgroundColor: theme.colors.primary, borderColor: theme.colors.secondary}}>Retourner à la partie</button>} */}
<button onClick={goBack} className="ButtonNavRejoin" style={{ visibility:returnVisibility}}>Retourner à la partie</button>
</div>
{/* Lobbies */}
@ -271,9 +286,6 @@ function NewPlay() {
</div>
</div>
{/* <div className="MidContainer">
</div> */}
<div className='NewrightContainer'>
{user && (<ScoreBoard Player={user}/>)}
</div>

@ -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;

Loading…
Cancel
Save