prevent typing after winning
This commit is contained in:
parent
58497a6b9f
commit
3723c18616
1 changed files with 1 additions and 1 deletions
|
@ -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}`)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue