From 3d0855ace1f329e07246a024919106a20888e782 Mon Sep 17 00:00:00 2001 From: Pierre Ferreira Date: Mon, 4 Dec 2023 13:49:55 +0100 Subject: [PATCH] ajout de la gestion quand il n'y a aucun lobby --- cryptide_project/src/Pages/Lobbies.tsx | 35 +++++++++++------- cryptide_project/src/Pages/NewPlay.tsx | 10 +++++ cryptide_project/src/server/db/socialgraph.db | Bin 28672 -> 28672 bytes 3 files changed, 32 insertions(+), 13 deletions(-) diff --git a/cryptide_project/src/Pages/Lobbies.tsx b/cryptide_project/src/Pages/Lobbies.tsx index 591751e..016140c 100644 --- a/cryptide_project/src/Pages/Lobbies.tsx +++ b/cryptide_project/src/Pages/Lobbies.tsx @@ -90,7 +90,9 @@ function Lobbies() { }) }, []) - + function createLobby(){ + socket.emit("lobby created") + } return(
@@ -134,18 +136,25 @@ function Lobbies() {
-
- {filteredLobbiesToShow.map((lobby, index) => ( - - ))} -
+ {filteredLobbiesToShow.length === 0 ? ( +
+

Il n'y a aucun lobby disponible

+ +
+ ) : ( +
+ {filteredLobbiesToShow.map((lobby, index) => ( + + ))} +
+ )} ); } diff --git a/cryptide_project/src/Pages/NewPlay.tsx b/cryptide_project/src/Pages/NewPlay.tsx index 3c60916..5abac11 100644 --- a/cryptide_project/src/Pages/NewPlay.tsx +++ b/cryptide_project/src/Pages/NewPlay.tsx @@ -287,6 +287,16 @@ function NewPlay() {
+
+

+ {user && user.pseudo} +

+ Person +
{user && ()}
diff --git a/cryptide_project/src/server/db/socialgraph.db b/cryptide_project/src/server/db/socialgraph.db index 481c484971a3af38df41d95316268e98ee892556..fa5484ca889818db549362726ee0e8699a3a1e5f 100644 GIT binary patch delta 447 zcmZp8z}WDBae_2s{zMsP#{7*5OZXM|xMnf%FW`6NyTzBo$IZKj*MsLVPYaJ6_kQj~ zu76y!HX90*ait`QaWe4AHnJKsGWsT_xRmDRR;m~!sTdllWEBLLlx~m8)c(&&$Is3%5{ga;E-l89tsA27W8vb^QBymhlUm8VgG63+hf7Jj0 delta 262 zcmZp8z}WDBae_2s_Cy(H#_Wv=OZeq@x&ATmFW`6NyTzBo$IZKj*MsLVPYaJ6_kQj~ zu78^i74C3t{wKx8%Err|$-sYNGmk<5|HJ_P$(j1IrFeOkG4NaQuH)awvy9J(zlK+f z=LO#nz7oD|n-vUPcqUG8VRd9_WM!NzAZ@exxy@T4M#0Hf{pIxpIT@M78B2>(i;6{g z`KK`O@|QF4f9HS4|CIj@|7HGD{0I4W@UQ1z#y^+8oWFCkphGDCMG>sA5|_qG{%)YgaQ?}a`O*-L92{Vc$pFfOP7(kB