<div className="player-info">
<span className="players-header">Players: </span>
{props.player.name}
+ {props.player.score > 0 ? ` (${props.player.score})` : ""}
{props.other_players.map(other => (
<span key={other.id}>
{", "}
{other.name}
+ {other.score > 0 ? ` (${other.score})` : ""}
</span>
))}
</div>
const response = await fetch_post_json(`answer/${this.props.prompt.id}`, {
answers: this.answers.map(r => r.current.value)
});
- if (response.status == 200) {
+ if (response.status === 200) {
const result = await response.json();
if (! result.valid) {
add_message("danger", result.message);
</p>
<h2>{this.props.prompt.prompt}</h2>
<form onSubmit={this.handle_submit}>
- {Array(this.props.prompt.items).fill(null).map((whocares,i) => {
+ {[...Array(this.props.prompt.items)].map((whocares,i) => {
return (
<div
key={i}