Hiding item card for other players.

logins
Thomas Hintz 5 years ago
parent 2d8aee8c65
commit a22cf21662

@ -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 = (
<div className='game-card'>
<GroupBox title={itemCard}>
<div className='card'
dangerouslySetInnerHTML={{__html: this.props.ui.actionValue}} />
</GroupBox>
</div>
);
if (this.props.player.name === this.props.game.currentPlayer) {
view = (
<div className='game-card'>
<GroupBox title={itemCard}>
<div className='card'
dangerouslySetInnerHTML={{__html: this.props.ui.actionValue}} />
</GroupBox>
</div>
);
} else {
view = (
<div>
<p>{currentPlayer.name} drew an {itemCard}</p>
</div>
);
}
buttons = (<Button onClick={() => this.props.showNextAction()}>Continue</Button>);
break;
case 'farmers-fate':
@ -1262,7 +1270,7 @@ class AlertOverlay extends React.Component {
{this.props.children}
<br />
<Button onClick={this.buttonClick}>{this.props.buttonText}</Button>
<label><input type='checkbox' /> {`Don't show again`}</label>
<label><input type='checkbox' onClick={this.hidePermanent} /> {`Don't show again`}</label>
<a href='#' onClick={this.hide}>close</a>
</div>
</div>

Loading…
Cancel
Save