Some light bug solving

This commit is contained in:
Tiago Ribeiro
2023-08-11 23:54:09 +01:00
parent db54d58bab
commit d9ca0e84a6
3 changed files with 13 additions and 11 deletions

View File

@@ -57,16 +57,18 @@ export default function Speaking({id, title, text, type, prompts, onNext, onBack
))} ))}
</span> </span>
</div> </div>
<div className="flex flex-col gap-4"> {prompts && prompts.length > 0 && (
<span className="font-bold">You should talk about the following things:</span> <div className="flex flex-col gap-4">
<div className="flex flex-col gap-1 ml-4"> <span className="font-bold">You should talk about the following things:</span>
{prompts.map((x, index) => ( <div className="flex flex-col gap-1 ml-4">
<li className="italic" key={index}> {prompts.map((x, index) => (
{x} <li className="italic" key={index}>
</li> {x}
))} </li>
))}
</div>
</div> </div>
</div> )}
</div> </div>
<ReactMediaRecorder <ReactMediaRecorder

View File

@@ -52,7 +52,7 @@ export default function Listening({exam, showSolutions = false, onFinish}: Props
return; return;
} }
if (!userSolutions.map((x) => x.score.missing).every((x) => x === 0) && !showSolutions && !hasExamEnded) { if (![...userSolutions.map((x) => x.score.missing), solution?.score.missing].every((x) => x === 0) && !showSolutions && !hasExamEnded) {
setShowBlankModal(true); setShowBlankModal(true);
return; return;
} }

View File

@@ -112,7 +112,7 @@ export default function Reading({exam, showSolutions = false, onFinish}: Props)
return; return;
} }
if (!userSolutions.map((x) => x.score.missing).every((x) => x === 0) && !showSolutions && !hasExamEnded) { if (![...userSolutions.map((x) => x.score.missing), solution?.score.missing].every((x) => x === 0) && !showSolutions && !hasExamEnded) {
setShowBlankModal(true); setShowBlankModal(true);
return; return;
} }