diff --git a/lib/react/gather.jsx b/lib/react/gather.jsx index 260959d..882f0b8 100644 --- a/lib/react/gather.jsx +++ b/lib/react/gather.jsx @@ -436,7 +436,6 @@ var ServerVoting = React.createClass({ render() { var self = this; let servers = self.props.servers.map(server => { - let voteButton; let votes = self.votesForServer(server); if (self.props.currentGatherer.serverVote === server.id) { return ( @@ -457,12 +456,12 @@ var ServerVoting = React.createClass({ } }); - let message = (self.props.currentGatherer.serverVote !== null) ? "Server Votes" : "Please Vote for a Server"; + let voted = self.props.currentGatherer.serverVote !== null; return (
- {message} + {voted ? "Server Votes" : "Please Vote for a Server" }
{servers} @@ -493,7 +492,7 @@ var MapVoting = React.createClass({ render() { var self = this; - var maps = self.props.maps.map(map => { + let maps = self.props.maps.map(map => { let votes = self.votesForMap(map); if (self.props.currentGatherer.mapVote === map.id) { return ( @@ -516,10 +515,13 @@ var MapVoting = React.createClass({ ); } }); + + let voted = (self.props.currentGatherer.mapVote !== null); + return (
- Map Voting + {voted ? "Map Votes" : "Please Vote for a Map"}
{maps} diff --git a/public/js/app.js b/public/js/app.js index 546a13f..9dd134c 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -623,7 +623,6 @@ var ServerVoting = React.createClass({ render: function render() { var self = this; var servers = self.props.servers.map(function (server) { - var voteButton = undefined; var votes = self.votesForServer(server); if (self.props.currentGatherer.serverVote === server.id) { return React.createElement( @@ -652,7 +651,7 @@ var ServerVoting = React.createClass({ } }); - var message = self.props.currentGatherer.serverVote !== null ? "Server Votes" : "Please Vote for a Server"; + var voted = self.props.currentGatherer.serverVote !== null; return React.createElement( "div", @@ -660,7 +659,7 @@ var ServerVoting = React.createClass({ React.createElement( "div", { className: "panel-heading" }, - message + voted ? "Server Votes" : "Please Vote for a Server" ), React.createElement( "div", @@ -725,13 +724,16 @@ var MapVoting = React.createClass({ ); } }); + + var voted = self.props.currentGatherer.mapVote !== null; + return React.createElement( "div", { className: "panel panel-default" }, React.createElement( "div", { className: "panel-heading" }, - "Map Voting" + voted ? "Map Votes" : "Please Vote for a Map" ), React.createElement( "div",