diff --git a/src/components/farm/Board.jsx b/src/components/farm/Board.jsx index 24553f3..dc05838 100644 --- a/src/components/farm/Board.jsx +++ b/src/components/farm/Board.jsx @@ -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 { ); } - const actionComponent = ( - 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 (
@@ -2273,7 +2259,21 @@ class BoardApp extends React.Component { game={this.props.game} showScreen={this.showScreen} />
- {actionComponent} + 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} />
@@ -2321,7 +2321,21 @@ class BoardApp extends React.Component {
- {actionComponent} + 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} />