Updated a problem with the rendering of the Solutions

This commit is contained in:
Tiago Ribeiro
2023-09-18 08:16:56 +01:00
parent efb341355d
commit 68fb5e5bc7
4 changed files with 56 additions and 51 deletions

View File

@@ -88,7 +88,7 @@ export default function MultipleChoice({id, type, prompt, questions, userSolutio
<div className="flex flex-col gap-4 w-full h-full mb-20">
<div className="flex flex-col gap-2 mt-4 h-full bg-mti-gray-smoke rounded-xl px-16 py-8">
<span className="text-xl font-semibold">{prompt}</span>
{questionIndex < questions.length && (
{userSolutions && questionIndex < questions.length && (
<Question
{...questions[questionIndex]}
userSolution={userSolutions.find((x) => questions[questionIndex].id === x.question)?.option}