Merge branch 'master' into feature/pve-demo

This commit is contained in:
Songyi Huang 2021-04-25 16:43:39 -07:00
commit e57e26dc5f
1 changed files with 7 additions and 1 deletions

View File

@ -143,6 +143,8 @@ class DoudizhuGameBoard extends React.Component {
<div style={{ marginRight: '2em' }} className={'timer ' + fadeClassName}> <div style={{ marginRight: '2em' }} className={'timer ' + fadeClassName}>
<div className="timer-text">{millisecond2Second(this.props.considerationTime)}</div> <div className="timer-text">{millisecond2Second(this.props.considerationTime)}</div>
</div> </div>
{this.props.gamePlayable ?
(<>
<Button <Button
onClick={() => { onClick={() => {
this.props.handleMainPlayerAct('deselect'); this.props.handleMainPlayerAct('deselect');
@ -165,7 +167,7 @@ class DoudizhuGameBoard extends React.Component {
Pass Pass
</Button> </Button>
<Button <Button
disabled={this.props.selectedCards.length === 0} disabled={!this.props.selectedCards || this.props.selectedCards.length === 0}
onClick={() => { onClick={() => {
this.props.handleMainPlayerAct('play'); this.props.handleMainPlayerAct('play');
}} }}
@ -174,6 +176,10 @@ class DoudizhuGameBoard extends React.Component {
> >
Play Play
</Button> </Button>
</>)
:
undefined}
</div> </div>
); );
} else { } else {