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
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -23,4 +23,5 @@ dist-ssr
|
|||
*.sln
|
||||
*.sw?
|
||||
|
||||
houhou.db
|
||||
houhou.db
|
||||
src/data/kanadata.json
|
|
@ -83,6 +83,9 @@ export function Component() {
|
|||
// Check the answer
|
||||
if (!possibleAnswers.has(currentAnswer)) {
|
||||
setIsIncorrect(true);
|
||||
|
||||
const lastItem = reviewQueue[reviewQueue.length - 1];
|
||||
if (!_.isEqual(lastItem, nextItem)) setReviewQueue([...reviewQueue, nextItem]);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -90,7 +93,7 @@ export function Component() {
|
|||
setAnyProgress(true);
|
||||
setIsIncorrect(false);
|
||||
setCurrentAnswer("");
|
||||
const [_, ...rest] = reviewQueue;
|
||||
const [_currentItem, ...rest] = reviewQueue;
|
||||
setReviewQueue(rest);
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue