v3.0.0: Добавлен обратный поворот карточки в тесте по клику
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 28s
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 28s
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "play-life-web",
|
"name": "play-life-web",
|
||||||
"version": "2.10.0",
|
"version": "3.0.0",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
|
|||||||
@@ -128,7 +128,15 @@ function TestWords({ onNavigate, wordCount: initialWordCount, configId: initialC
|
|||||||
}
|
}
|
||||||
|
|
||||||
const handleCardFlip = (wordId) => {
|
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-container" key={word.id}>
|
||||||
<div
|
<div
|
||||||
className={`test-card ${isFlipped ? 'flipped' : ''}`}
|
className={`test-card ${isFlipped ? 'flipped' : ''}`}
|
||||||
onClick={() => !isFlipped && handleCardFlip(word.id)}
|
onClick={() => handleCardFlip(word.id)}
|
||||||
>
|
>
|
||||||
<div className="test-card-front">
|
<div className="test-card-front">
|
||||||
<div className="test-card-content">
|
<div className="test-card-content">
|
||||||
|
|||||||
Reference in New Issue
Block a user