From 67f61ffa7df5ac8095a59e66b0b3c90c90ffb6cd Mon Sep 17 00:00:00 2001 From: Pierre Ferreira Date: Tue, 5 Dec 2023 12:16:02 +0100 Subject: [PATCH] mise en place de la gestion de joueur dynamic dans la deducGrid 2 :zap: --- cryptide_project/src/Pages/DeducCheck.tsx | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/cryptide_project/src/Pages/DeducCheck.tsx b/cryptide_project/src/Pages/DeducCheck.tsx index 0feb90a..9ac3a33 100644 --- a/cryptide_project/src/Pages/DeducCheck.tsx +++ b/cryptide_project/src/Pages/DeducCheck.tsx @@ -25,11 +25,9 @@ function DeducCheck() { const params = new URLSearchParams(window.location.search); - const NbPlayer = params.get('NbPlayer'); + const NbPlayer = params.get('nbPlayer'); const actualPlayerIndex = params.get('actualId') ?? '0'; - console.log(parseInt(NbPlayer ?? 'nnnnnnnnnnuuuuuuuuuuuuulllllll')) - console.log(parseInt(actualPlayerIndex ?? 'nnnnnnnnnnuuuuuuuuuuuuulllllllooooooooosssssssss')) //const { actualPlayerIndex, players } = useGame(); // let playerstmp @@ -70,7 +68,7 @@ function DeducCheck() { Indices - {playerColors.map((player, index) => ( + {players.map((player, index) => ( {player} ))} @@ -79,7 +77,7 @@ function DeducCheck() { {firstHalfIndices.map((indice, rowIndex) => ( {indice.ToString("fr")} - {playerColors.map((player, colIndex) => ( + {players.map((player, colIndex) => ( {/* */} @@ -95,7 +93,7 @@ function DeducCheck() { Indices - {playerColors.map((player, index) => ( + {players.map((player, index) => ( {player} ))} @@ -104,7 +102,7 @@ function DeducCheck() { {secondHalfIndices.map((indice, rowIndex) => ( {indice.ToString("fr")} - {playerColors.map((player, colIndex) => ( + {players.map((player, colIndex) => ( {/* */}