From 3723c18616d41abe4811e38b084ce5c4baf8cb1e Mon Sep 17 00:00:00 2001 From: Samuel Rey Date: Sat, 22 Jan 2022 01:02:51 +0100 Subject: [PATCH] prevent typing after winning --- src/App.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/App.tsx b/src/App.tsx index c75838a..582a136 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -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}`) } }