From c6612a8b6dde5a5a9776d424ed33f5ca685699c6 Mon Sep 17 00:00:00 2001 From: Yuval Adam <_@yuv.al> Date: Wed, 5 Mar 2025 12:00:52 +0100 Subject: fix states --- morsehero/src/pages/HomePage.tsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/morsehero/src/pages/HomePage.tsx b/morsehero/src/pages/HomePage.tsx index 7ec4e90..bf07bd5 100644 --- a/morsehero/src/pages/HomePage.tsx +++ b/morsehero/src/pages/HomePage.tsx @@ -48,6 +48,14 @@ const HomePage = () => { // Clear feedback setFeedback(''); + // Reset button states + optionButtonsRef.current.forEach(button => { + if (button) { + button.disabled = false; + button.classList.remove('correct', 'incorrect', 'key-pressed'); + } + }); + // Generate a random character const randomIndex = Math.floor(Math.random() * allChars.length); const newChar = allChars[randomIndex]; -- cgit v1.3.1