From 6983a3f3423deecb19de8a7faef474ec9c346541 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20=27birdy=27=20Danjou?= Date: Tue, 5 Dec 2023 04:03:50 +0100 Subject: [PATCH] fix() hide button for spec --- src/modules/game/components/Table/Table.tsx | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/modules/game/components/Table/Table.tsx b/src/modules/game/components/Table/Table.tsx index 713a7bd..d85f694 100644 --- a/src/modules/game/components/Table/Table.tsx +++ b/src/modules/game/components/Table/Table.tsx @@ -102,6 +102,8 @@ export const Table = ({ contract, account, players }: TableProps) => { setDealInProgress(false); }; + const inGame = players.some((p) => p.address === account); + return (
Cipher Bomb @@ -115,7 +117,7 @@ export const Table = ({ contract, account, players }: TableProps) => {
Current turn: {currentTurn + 1} ({5 - currentTurn} cards)

- {dealIsNeeded && ( + {inGame && dealIsNeeded && (
)}
-
-
- Your role -

- -

+ {inGame && ( +
+
+ Your role +

+ +

+
-
+ )}