From a22cf21662c5f2b71ead3bc25f20659bed0f790a Mon Sep 17 00:00:00 2001 From: Thomas Hintz Date: Mon, 10 Feb 2020 15:00:33 -0800 Subject: [PATCH] Hiding item card for other players. --- src/components/farm/Board.jsx | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/src/components/farm/Board.jsx b/src/components/farm/Board.jsx index ba7fef3..f878afa 100644 --- a/src/components/farm/Board.jsx +++ b/src/components/farm/Board.jsx @@ -1026,14 +1026,22 @@ class Action extends React.Component { .find(p => p.player.name === this.props.game.currentPlayer).player; switch (this.props.ui.action) { case 'otb': - view = ( -
- -
- -
- ); + if (this.props.player.name === this.props.game.currentPlayer) { + view = ( +
+ +
+ +
+ ); + } else { + view = ( +
+

{currentPlayer.name} drew an {itemCard}

+
+ ); + } buttons = (); break; case 'farmers-fate': @@ -1262,7 +1270,7 @@ class AlertOverlay extends React.Component { {this.props.children}
- + close