diff options
| author | Yuval Adam <_@yuv.al> | 2025-03-05 12:00:52 +0100 |
|---|---|---|
| committer | Yuval Adam <_@yuv.al> | 2025-03-05 12:00:52 +0100 |
| commit | c6612a8b6dde5a5a9776d424ed33f5ca685699c6 (patch) | |
| tree | fb8f55375cde64fa492fc03f5d8aaaf32d437d65 /morsehero | |
| parent | d9abe6078499206ac65a2721433f502a7b2432f1 (diff) | |
fix states
Diffstat (limited to 'morsehero')
| -rw-r--r-- | morsehero/src/pages/HomePage.tsx | 8 |
1 files changed, 8 insertions, 0 deletions
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]; |
