X-Git-Url: https://git.cworth.org/git?p=lmno.games;a=blobdiff_plain;f=empathy%2Fempathy.jsx;h=6f051f484f3ca3dfc71a21835ac787360192f434;hp=54d6c2660975aac30c9376ba05cff1c4feef3048;hb=37a921fe6b9c664da0b33b76f7d6855e8679c754;hpb=3c2c043c4a6e389a597736c9fd366b716ac7237c diff --git a/empathy/empathy.jsx b/empathy/empathy.jsx index 54d6c26..6f051f4 100644 --- a/empathy/empathy.jsx +++ b/empathy/empathy.jsx @@ -127,10 +127,12 @@ const PlayerInfo = React.memo(props => {
Players: {props.player.name} + {props.player.score > 0 ? ` (${props.player.score})` : ""} {props.other_players.map(other => ( {", "} {other.name} + {other.score > 0 ? ` (${other.score})` : ""} ))}
@@ -326,7 +328,7 @@ class ActivePrompt extends React.PureComponent { 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); @@ -366,7 +368,7 @@ class ActivePrompt extends React.PureComponent {

{this.props.prompt.prompt}

- {Array(this.props.prompt.items).fill(null).map((whocares,i) => { + {[...Array(this.props.prompt.items)].map((whocares,i) => { return (