feat: Implement score increment on click and cleanup CSS

- Implemented score increment functionality directly on the score display in GameDetail.jsx.

- Deleted obsolete ValidationModal.module.css to finalize style consolidation.

- This resolves all outstanding tasks for the refactor and adds a minor feature enhancement.

- Closes #1
This commit is contained in:
Frank Schwenk
2025-06-20 13:01:30 +02:00
parent dbc173f57b
commit 429d479f69
2 changed files with 8 additions and 2 deletions

View File

@@ -28,7 +28,14 @@ const GameDetail = ({ game, onFinishGame, onUpdateScore, onBack }) => {
key={name + idx} key={name + idx}
> >
<span className={styles['player-name']}>{name}</span> <span className={styles['player-name']}>{name}</span>
<span className={styles['score']} id={`score${idx+1}`}>{scores[idx]}</span> <span
className={styles['score']}
id={`score${idx + 1}`}
onClick={() => !isCompleted && onUpdateScore(idx + 1, 1)}
aria-label={`Aktueller Punktestand für ${name}: ${scores[idx]}. Klicken zum Erhöhen.`}
>
{scores[idx]}
</span>
<button <button
className={styles['score-button']} className={styles['score-button']}
disabled={isCompleted} disabled={isCompleted}

View File

@@ -1 +0,0 @@
/* DEPRECATED: All modal styles are now in Modal.module.css */