X-Git-Url: https://git.cworth.org/git?p=lmno.games;a=blobdiff_plain;f=empathy%2Fempathy.jsx;h=163b977cbb8c474560a4dfa9cf24c1a03926e56b;hp=3869b3a249f12ff169a62e7dca85a789c4beb2da;hb=f9c9dec19b3ee6e272683301d49c3add6fb176f8;hpb=533300fbcbfec8c219901cbde2d9c6f336939f97
diff --git a/empathy/empathy.jsx b/empathy/empathy.jsx
index 3869b3a..163b977 100644
--- a/empathy/empathy.jsx
+++ b/empathy/empathy.jsx
@@ -570,25 +570,30 @@ class Ambiguities extends React.PureComponent {
}
let still_waiting = null;
- if (Object.keys(this.props.players_judging).length) {
- still_waiting = [
-
- Still waiting for the following players:
-
,
-
- {Object.keys(this.props.players_judging).map(player => {
- return (
- -
- {player}
- {this.props.players_judging[player] ?
- : null }
-
- );
- })}
-
- ];
+ const judging_players = Object.keys(this.props.players_judging);
+ if (judging_players.length) {
+ still_waiting = (
+
+
+ Still waiting for the following player
+ {judging_players.length > 1 ? 's' : '' }
+ :
+
+
+ {judging_players.map(player => {
+ return (
+ -
+ {player}
+ {this.props.players_judging[player] ?
+ : null }
+
+ );
+ })}
+
+
+ );
}
if (this.props.players_judged.has(this.props.player.name)) {
@@ -740,25 +745,30 @@ class ActivePrompt extends React.PureComponent {
}
let still_waiting = null;
- if (Object.keys(this.props.players_answering).length) {
- still_waiting = [
-
- Still waiting for the following players:
-
,
-
- {Object.keys(this.props.players_answering).map(player => {
- return (
- -
- {player}
- {this.props.players_answering[player] ?
- : null }
-
- );
- })}
-
- ];
+ const answering_players = Object.keys(this.props.players_answering);;
+ if (answering_players.length) {
+ still_waiting = (
+
+
+ Still waiting for the following player
+ {answering_players.length > 1 ? 's' : ''}
+ :
+
+
+ {answering_players.map(player => {
+ return (
+ -
+ {player}
+ {this.props.players_answering[player] ?
+ : null }
+
+ );
+ })}
+
+
+ );
}
if (this.props.players_answered.has(this.props.player.name)) {