Created
November 8, 2018 11:06
-
-
Save varmais/a08f7d91115afe99a745ed16595c5e52 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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