From 8b67e1e2d58396f78e63c6a5bac272e7ced9f6e3 Mon Sep 17 00:00:00 2001 From: Pierre Ferreira Date: Wed, 22 Nov 2023 08:55:59 +0100 Subject: [PATCH] finission du style de la page de fin de jeu :lipstick: --- .../src/Components/ScoreBoard.tsx | 2 +- cryptide_project/src/Pages/EndGame.css | 27 +++++++-- cryptide_project/src/Pages/EndGame.tsx | 58 +++++-------------- 3 files changed, 38 insertions(+), 49 deletions(-) diff --git a/cryptide_project/src/Components/ScoreBoard.tsx b/cryptide_project/src/Components/ScoreBoard.tsx index b756e4a..d0540ab 100644 --- a/cryptide_project/src/Components/ScoreBoard.tsx +++ b/cryptide_project/src/Components/ScoreBoard.tsx @@ -28,7 +28,7 @@ function ScoreBoard({Player = null}) { //
diff --git a/cryptide_project/src/Pages/EndGame.css b/cryptide_project/src/Pages/EndGame.css index 00f1e43..9af5187 100644 --- a/cryptide_project/src/Pages/EndGame.css +++ b/cryptide_project/src/Pages/EndGame.css @@ -48,16 +48,35 @@ align-items: center; */ /* flex-direction: column; */ - width: 300px; - + /* width: 300px; */ + width: 30%; + margin-bottom: 20px; + /* margin-bottom: 10px; */ + border: solid 1px whitesmoke; border-radius: 15px; background-color: white; } -.losingPlayer{ +.losingPlayersContainer{ display: flex; + flex-wrap: wrap; + justify-content: space-evenly; + + margin: 10px 0; + + max-width: 50%; + + overflow-y: scroll; + max-height: 200px; + /* background-color: yellow; */ +} - background-color: yellow; +.indiceDisplay{ + border: solid 2px whitesmoke; + border-radius: 10px; + margin: 0 15px 0 15px; + padding: 10px; + box-shadow: 5px 5px 5px rgb(246, 246, 246); } \ No newline at end of file diff --git a/cryptide_project/src/Pages/EndGame.tsx b/cryptide_project/src/Pages/EndGame.tsx index 5e6b768..411753a 100644 --- a/cryptide_project/src/Pages/EndGame.tsx +++ b/cryptide_project/src/Pages/EndGame.tsx @@ -38,29 +38,6 @@ function EndGame() { } const theme = useTheme(); - - - const playersRows = []; - for (let i = 0; i < losingPlayers.length; i += 3) { - const rowPlayers = losingPlayers.slice(i, i + 3); - playersRows.push( -
- {rowPlayers.map((player, index) => ( -
- {player.id !== winner?.id && ( -
- {}} index={index} showCircle={false}/> -
- {indices[players.findIndex((p) => p.id == player?.id)].ToString("fr")} -
-
- )} -
- ))} -
- ); - } - return (
@@ -71,32 +48,25 @@ function EndGame() {
- -

{indices[players.findIndex((p) => p.id == winner?.id)].ToString("fr")}

+ +

{indices[players.findIndex((p) => p.id == winner?.id)].ToString("fr")}

- {/*
*/} - {/* { - losingPlayers.map((player, index) => ( -
- {player.id!=winner?.id && - <> -
- {}} index={index} showCircle={false}/> -
{indices[players.findIndex((p) => p.id == player?.id)].ToString("fr")}
-
- - } -
- )) - } */} - - {playersRows} - - {/*
*/} +
+ {losingPlayers.map((player, index) => ( +
+ {player.id !== winner?.id && ( +
+ {}} index={index} showCircle={false}/> +
{indices[players.findIndex((p) => p.id == player?.id)].ToString("fr")}
+
+ )} +
+ ))} +