v3.0.0: Добавлен обратный поворот карточки в тесте по клику
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 28s

This commit is contained in:
poignatov
2026-01-06 14:34:28 +03:00
parent 647c549ec9
commit a7bc912db3
3 changed files with 12 additions and 4 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "play-life-web",
"version": "2.10.0",
"version": "3.0.0",
"type": "module",
"scripts": {
"dev": "vite",

View File

@@ -128,7 +128,15 @@ function TestWords({ onNavigate, wordCount: initialWordCount, configId: initialC
}
const handleCardFlip = (wordId) => {
setFlippedCards(prev => new Set(prev).add(wordId))
setFlippedCards(prev => {
const newSet = new Set(prev)
if (newSet.has(wordId)) {
newSet.delete(wordId)
} else {
newSet.add(wordId)
}
return newSet
})
}
// Завершение теста
@@ -432,7 +440,7 @@ function TestWords({ onNavigate, wordCount: initialWordCount, configId: initialC
<div className="test-card-container" key={word.id}>
<div
className={`test-card ${isFlipped ? 'flipped' : ''}`}
onClick={() => !isFlipped && handleCardFlip(word.id)}
onClick={() => handleCardFlip(word.id)}
>
<div className="test-card-front">
<div className="test-card-content">