}
let still_waiting = null;
- if (Object.keys(this.props.players_judging).length) {
+ const judging_players = Object.keys(this.props.players_judging);
+ if (judging_players.length) {
still_waiting = [
<p>
- Still waiting for the following players:
+ Still waiting for the following player
+ {judging_players.length > 1 ? 's' : '' }
+ :
</p>,
<ul>
- {Object.keys(this.props.players_judging).map(player => {
+ {judging_players.map(player => {
return (
<li
key={player}
}
let still_waiting = null;
- if (Object.keys(this.props.players_answering).length) {
+ const answering_players = Object.keys(this.props.players_answering);;
+ if (answering_players.length) {
still_waiting = [
<p>
- Still waiting for the following players:
+ Still waiting for the following player
+ {answering_players.length > 1 ? 's' : ''}
+ :
</p>,
<ul>
- {Object.keys(this.props.players_answering).map(player => {
+ {answering_players.map(player => {
return (
<li
key={player}