add incorrect items to the end of the queue
This commit is contained in:
parent
f87230596d
commit
492215d17c
2 changed files with 6 additions and 2 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -24,3 +24,4 @@ dist-ssr
|
||||||
*.sw?
|
*.sw?
|
||||||
|
|
||||||
houhou.db
|
houhou.db
|
||||||
|
src/data/kanadata.json
|
|
@ -83,6 +83,9 @@ export function Component() {
|
||||||
// Check the answer
|
// Check the answer
|
||||||
if (!possibleAnswers.has(currentAnswer)) {
|
if (!possibleAnswers.has(currentAnswer)) {
|
||||||
setIsIncorrect(true);
|
setIsIncorrect(true);
|
||||||
|
|
||||||
|
const lastItem = reviewQueue[reviewQueue.length - 1];
|
||||||
|
if (!_.isEqual(lastItem, nextItem)) setReviewQueue([...reviewQueue, nextItem]);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -90,7 +93,7 @@ export function Component() {
|
||||||
setAnyProgress(true);
|
setAnyProgress(true);
|
||||||
setIsIncorrect(false);
|
setIsIncorrect(false);
|
||||||
setCurrentAnswer("");
|
setCurrentAnswer("");
|
||||||
const [_, ...rest] = reviewQueue;
|
const [_currentItem, ...rest] = reviewQueue;
|
||||||
setReviewQueue(rest);
|
setReviewQueue(rest);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue