From 87cdd9a4f0063e4d4bbdc5e9a25c642606012b7e Mon Sep 17 00:00:00 2001 From: Pierre Ferreira Date: Tue, 14 Nov 2023 14:22:15 +0100 Subject: [PATCH] =?UTF-8?q?ajout=20du=20code=20de=20la=20room=20affich?= =?UTF-8?q?=C3=A9=20dans=20le=20lobby,=20il=20peut=20etre=20cach=C3=A9=20o?= =?UTF-8?q?u=20montr=C3=A9=20en=20un=20simple=20clique.=20:zap:?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cryptide_project/src/Pages/Lobby.css | 13 +++++++++++++ cryptide_project/src/Pages/Lobby.tsx | 11 +++++++++++ 2 files changed, 24 insertions(+) diff --git a/cryptide_project/src/Pages/Lobby.css b/cryptide_project/src/Pages/Lobby.css index 5aed52c..546a806 100644 --- a/cryptide_project/src/Pages/Lobby.css +++ b/cryptide_project/src/Pages/Lobby.css @@ -41,4 +41,17 @@ margin: 20px; } +.codeDiv{ + display: flex; + align-items: end; + justify-content: end; + margin: auto 20px; +} +.codeDiv p{ + font-style: italic; + font-weight: bold; + color: gray; + font-size: 20px; + cursor: pointer; +} \ No newline at end of file diff --git a/cryptide_project/src/Pages/Lobby.tsx b/cryptide_project/src/Pages/Lobby.tsx index aea8d22..9e40a5a 100644 --- a/cryptide_project/src/Pages/Lobby.tsx +++ b/cryptide_project/src/Pages/Lobby.tsx @@ -21,6 +21,8 @@ import PlayerItemList from '../Components/PlayerItemList' function Lobby() { const theme=useTheme(); + + const [codeShowed, setCodeShowed] = useState(true); const players = [ { pdp: Person, name: "Dummy (vous)", id: 1 }, @@ -37,6 +39,15 @@ function Lobby() {
+
setCodeShowed(!codeShowed)}> + { + codeShowed ? ( +

Room : 63194

+ ) : ( +

Room : ******

+ ) + } +
{/* //! voir pour la gestion avec un liste, utilisateur avec le "+ (vous)" et les pdp avec les lettres grecs (?)*/} {players.map((player) => (