Merge branch 'develop' into feature/68/update-evaluation-to-background

This commit is contained in:
Tiago Ribeiro
2024-01-08 20:59:55 +00:00
2 changed files with 7 additions and 2 deletions

View File

@@ -80,7 +80,8 @@ export default function Speaking({id, type, title, video_url, text, prompts, use
</div>
))}
</div>
{userSolutions[0].evaluation && userSolutions[0].evaluation.perfect_answer ? (
{userSolutions[0].evaluation &&
(userSolutions[0].evaluation.perfect_answer || userSolutions[0].evaluation.perfect_answer_1) ? (
<Tab.Group>
<Tab.List className="flex space-x-1 rounded-xl bg-ielts-speaking/20 p-1">
<Tab
@@ -112,7 +113,10 @@ export default function Speaking({id, type, title, video_url, text, prompts, use
</Tab.Panel>
<Tab.Panel className="w-full bg-ielts-speaking/10 h-fit rounded-xl p-6 flex flex-col gap-4">
<span className="w-full h-full min-h-fit cursor-text whitespace-pre-wrap">
{userSolutions[0].evaluation!.perfect_answer.replaceAll(/\s{2,}/g, "\n\n")}
{userSolutions[0].evaluation!.perfect_answer &&
userSolutions[0].evaluation!.perfect_answer.replaceAll(/\s{2,}/g, "\n\n")}
{userSolutions[0].evaluation!.perfect_answer_1 &&
userSolutions[0].evaluation!.perfect_answer_1.replaceAll(/\s{2,}/g, "\n\n")}
</span>
</Tab.Panel>
</Tab.Panels>