Fixing "your turn" notification.
This commit is contained in:
@@ -1995,6 +1995,8 @@ class BoardApp extends React.Component {
|
||||
}
|
||||
|
||||
actionShowing = () => {
|
||||
window.actionRef = this.actionRef;
|
||||
window.actionRefExtra = this.actionRefExtra;
|
||||
return (this.actionRef && this.actionRef.offsetParent) ||
|
||||
(this.actionRefExtra && this.actionRefExtra.offsetParent)
|
||||
}
|
||||
@@ -2222,22 +2224,6 @@ class BoardApp extends React.Component {
|
||||
</AlertOverlay>
|
||||
);
|
||||
}
|
||||
const actionComponent = (
|
||||
<Action
|
||||
currentPlayer={this.state.currentPlayer}
|
||||
timerId={this.state.timerId}
|
||||
setTimerId={this.setTimerId}
|
||||
forwardRef={x => this.actionRef = x}
|
||||
spaces={this.props.spaces}
|
||||
player={this.props.player}
|
||||
game={this.props.game}
|
||||
movePlayer={this.props.movePlayer}
|
||||
showNextAction={this.props.nextUIAction}
|
||||
otherPlayersTurn={this.props.player.name !== this.props.game.currentPlayer}
|
||||
screen={this.state.screen}
|
||||
showScreen={screen => this.showScreen(screen)}
|
||||
setMovingSkip={this.props.setMovingSkip}
|
||||
ui={this.props.ui} />);
|
||||
// faExchangeAlt -> trade icon, hidden for now
|
||||
return (
|
||||
<div className='game-container' ref={this.myRef}>
|
||||
@@ -2273,7 +2259,21 @@ class BoardApp extends React.Component {
|
||||
game={this.props.game} showScreen={this.showScreen} />
|
||||
</div>
|
||||
<div className={this.tabClass(SCREENS.action)}>
|
||||
{actionComponent}
|
||||
<Action
|
||||
currentPlayer={this.state.currentPlayer}
|
||||
timerId={this.state.timerId}
|
||||
setTimerId={this.setTimerId}
|
||||
forwardRef={x => this.actionRef = x}
|
||||
spaces={this.props.spaces}
|
||||
player={this.props.player}
|
||||
game={this.props.game}
|
||||
movePlayer={this.props.movePlayer}
|
||||
showNextAction={this.props.nextUIAction}
|
||||
otherPlayersTurn={this.props.player.name !== this.props.game.currentPlayer}
|
||||
screen={this.state.screen}
|
||||
showScreen={screen => this.showScreen(screen)}
|
||||
setMovingSkip={this.props.setMovingSkip}
|
||||
ui={this.props.ui} />
|
||||
</div>
|
||||
<div className={this.tabClass(SCREENS.cards)}>
|
||||
<Row>
|
||||
@@ -2321,7 +2321,21 @@ class BoardApp extends React.Component {
|
||||
</div>
|
||||
<div className='static-tab-container show-for-large'>
|
||||
<div className='tab show'>
|
||||
{actionComponent}
|
||||
<Action
|
||||
currentPlayer={this.state.currentPlayer}
|
||||
timerId={this.state.timerId}
|
||||
setTimerId={this.setTimerId}
|
||||
forwardRef={x => this.actionRefExtra = x}
|
||||
spaces={this.props.spaces}
|
||||
player={this.props.player}
|
||||
game={this.props.game}
|
||||
movePlayer={this.props.movePlayer}
|
||||
showNextAction={this.props.nextUIAction}
|
||||
otherPlayersTurn={this.props.player.name !== this.props.game.currentPlayer}
|
||||
screen={this.state.screen}
|
||||
showScreen={screen => this.showScreen(screen)}
|
||||
setMovingSkip={this.props.setMovingSkip}
|
||||
ui={this.props.ui} />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user