The ready bit is set to true when the client receives a game-state
event from the server.
This commit fixes things so that users will not see a brief flash of
the category-input form before the actual content that is desired.
window.game.set_end_judging(state.end_judging);
window.game.set_scores(state.scores);
+
+ window.game.state_ready();
});
events.addEventListener("prompt", event => {
players_judging: {},
judging_idle: false,
end_judging_votes: new Set(),
- scores: null
+ scores: null,
+ ready: false
};
}
players_judging: {},
judging_idle: false,
end_judging_votes: new Set(),
- scores: null
+ scores: null,
+ ready: false
});
}
}
set_judging_idle(value) {
- console.log("Setting judging idle to " + value);
this.setState({
judging_idle: value
});
});
}
+ state_ready() {
+ this.setState({
+ ready: true
+ });
+ }
+
render() {
const state = this.state;
const players_total = 1 + state.other_players.length;
/>;
}
+ if (! state.ready)
+ return null;
+
return [
<GameInfo
key="game-info"