Fixed some more issues with the Speaking

This commit is contained in:
Tiago Ribeiro
2024-06-18 22:16:31 +01:00
parent cb49e15cb0
commit 53dbf99fba
3 changed files with 15 additions and 8 deletions

View File

@@ -60,13 +60,16 @@ export default function InteractiveSpeaking({
setIsLoading(true);
const answer = await saveAnswer(questionIndex);
console.log(questionIndex + 1 < prompts.length, questionIndex, prompts.length);
if (questionIndex + 1 < prompts.length) {
setQuestionIndex(questionIndex + 1);
setIsLoading(false);
return;
}
setIsLoading(false);
setQuestionIndex(0);
onNext({
exercise: id,