diff options
| author | Yuval Adam <_@yuv.al> | 2025-03-05 12:23:55 +0100 |
|---|---|---|
| committer | Yuval Adam <_@yuv.al> | 2025-03-05 12:23:55 +0100 |
| commit | 9853a6e5365f14df2108a3446b8cb72c95b8c01d (patch) | |
| tree | 4e8e6b0eb3d6971bf61f014145446fd7770b2e34 | |
| parent | 5bf781f3ac381744fbec035f938d69a201f75fa4 (diff) | |
Remove feedback
| -rw-r--r-- | src/pages/HomePage.tsx | 54 |
1 files changed, 23 insertions, 31 deletions
diff --git a/src/pages/HomePage.tsx b/src/pages/HomePage.tsx index bf07bd5..5892c8c 100644 --- a/src/pages/HomePage.tsx +++ b/src/pages/HomePage.tsx @@ -16,7 +16,6 @@ const HomePage = () => { const [score, setScore] = useState(0); const [totalPlayed, setTotalPlayed] = useState(0); const [currentChar, setCurrentChar] = useState(''); - const [feedback, setFeedback] = useState(''); const [options, setOptions] = useState<string[]>([]); const [wpm, setWpm] = useState(20); const [showHints, setShowHints] = useState(false); @@ -45,9 +44,6 @@ const HomePage = () => { // Generate a new round const newRound = () => { - // Clear feedback - setFeedback(''); - // Reset button states optionButtonsRef.current.forEach(button => { if (button) { @@ -94,7 +90,6 @@ const HomePage = () => { const checkAnswer = (selectedChar: string) => { if (selectedChar === currentChar) { // Correct answer - setFeedback('Correct!'); setScore(prevScore => prevScore + 1); // Add to score tracker @@ -121,7 +116,6 @@ const HomePage = () => { setTimeout(newRound, 1500); } else { // Incorrect answer - setFeedback('Incorrect! The correct answer was ' + currentChar); // Add to score tracker const scoreTracker = document.getElementById('scoreTracker'); @@ -252,31 +246,29 @@ const HomePage = () => { ))} </div> - <div className="feedback" id="feedback">{feedback}</div> - </div> - - <div className="settings"> - <label htmlFor="wpmSelect">Speed:</label> - <select - id="wpmSelect" - value={wpm} - onChange={(e) => setWpm(parseInt(e.target.value))} - > - <option value="10">10 WPM</option> - <option value="15">15 WPM</option> - <option value="20">20 WPM</option> - <option value="25">25 WPM</option> - <option value="30">30 WPM</option> - </select> - <div className="hint-setting"> - <input - type="checkbox" - id="hintMode" - name="hintMode" - checked={showHints} - onChange={(e) => setShowHints(e.target.checked)} - /> - <label htmlFor="hintMode">Show Hints</label> + <div className="settings"> + <label htmlFor="wpmSelect">Speed:</label> + <select + id="wpmSelect" + value={wpm} + onChange={(e) => setWpm(parseInt(e.target.value))} + > + <option value="10">10 WPM</option> + <option value="15">15 WPM</option> + <option value="20">20 WPM</option> + <option value="25">25 WPM</option> + <option value="30">30 WPM</option> + </select> + <div className="hint-setting"> + <input + type="checkbox" + id="hintMode" + name="hintMode" + checked={showHints} + onChange={(e) => setShowHints(e.target.checked)} + /> + <label htmlFor="hintMode">Show Hints</label> + </div> </div> </div> </div> |
