prevent typing after winning

This commit is contained in:
Samuel Rey 2022-01-22 01:02:51 +01:00
parent 58497a6b9f
commit 3723c18616

View file

@ -50,7 +50,7 @@ function App() {
}, [isGameWon])
const onChar = (value: string) => {
if (currentGuess.length < 5 && guesses.length < 6) {
if (currentGuess.length < 5 && guesses.length < 6 && !isGameWon) {
setCurrentGuess(`${currentGuess}${value}`)
}
}