Skip to content

Instantly share code, notes, and snippets.

@varmais
Created November 8, 2018 11:06
Show Gist options
  • Save varmais/a08f7d91115afe99a745ed16595c5e52 to your computer and use it in GitHub Desktop.
Save varmais/a08f7d91115afe99a745ed16595c5e52 to your computer and use it in GitHub Desktop.
const Info = props => {
const missed = [...new Set(props.word.split(""))].filter(
letter => !props.usedLetters.includes(letter)
);
if (!props.health) {
return null;
}
return (
<div>
<div id="message">YOU MISSED:</div>
<div id="missed" style={{ color: "#4C71FA" }}>
{missed.join(", ")}
</div>
({props.word})
</div>
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment