diff --git a/app/javascripts/components/gather.js b/app/javascripts/components/gather.js index 17905e2..1dc0b8a 100644 --- a/app/javascripts/components/gather.js +++ b/app/javascripts/components/gather.js @@ -9,6 +9,7 @@ const hiveUrl = helper.hiveUrl; const SelectPlayerButton = React.createClass({ propTypes: { socket: React.PropTypes.object.isRequired, + gather: React.PropTypes.object.isRequired, gatherer: React.PropTypes.object.isRequired }, @@ -368,13 +369,13 @@ const GatherActions = React.createClass({
@@ -836,7 +837,9 @@ const GathererListItem = React.createClass({ thisGatherer.team === gather.pickingTurn) { action = ( - + ); } else { diff --git a/app/javascripts/components/main.js b/app/javascripts/components/main.js index d93f7e8..564bd34 100644 --- a/app/javascripts/components/main.js +++ b/app/javascripts/components/main.js @@ -362,6 +362,7 @@ const GatherPage = React.createClass({ onGatherSelected(gatherName) { let gather = this.state.gatherPool[gatherName]; if (gather === undefined) return; + this.updateTitle(); this.setState({ currentGather: gather.type }); diff --git a/lib/gather/controller.js b/lib/gather/controller.js index e68a651..7447218 100644 --- a/lib/gather/controller.js +++ b/lib/gather/controller.js @@ -171,7 +171,7 @@ module.exports = function (namespace) { let playerId = data.player; // Check team & leader - let gatherer = gatherPool.getGatherer(socket._user); + let gatherer = gather.getGatherer(socket._user); // Cancel if not gatherer or leader if (gatherer === null || gatherer.leader === false) { @@ -179,7 +179,7 @@ module.exports = function (namespace) { } // Cancel if id belongs to a leader - let selectedPlayer = gatherPool.getGatherer({id: playerId}); + let selectedPlayer = gather.getGatherer({id: playerId}); if (selectedPlayer === null || selectedPlayer.leader) { return null;