fix issue with doudizhu game replay
This commit is contained in:
parent
8be57eef48
commit
8e841f3ae7
|
@ -134,6 +134,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');
|
||||||
|
@ -156,7 +158,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');
|
||||||
}}
|
}}
|
||||||
|
@ -165,6 +167,10 @@ class DoudizhuGameBoard extends React.Component {
|
||||||
>
|
>
|
||||||
Play
|
Play
|
||||||
</Button>
|
</Button>
|
||||||
|
</>)
|
||||||
|
:
|
||||||
|
undefined}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue