From 3299acee36b723ceace727848b705a2a7fc64f03 Mon Sep 17 00:00:00 2001 From: Carlos Mesquita Date: Mon, 19 Aug 2024 23:46:51 +0100 Subject: [PATCH] Forgot to add a key in Level --- src/exams/Level.tsx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/exams/Level.tsx b/src/exams/Level.tsx index 6b2adf40..a5bdf478 100644 --- a/src/exams/Level.tsx +++ b/src/exams/Level.tsx @@ -16,6 +16,7 @@ import clsx from "clsx"; import { Dispatch, Fragment, SetStateAction, use, useEffect, useMemo, useRef, useState } from "react"; import { BsChevronDown, BsChevronUp } from "react-icons/bs"; import { toast } from "react-toastify"; +import { v4 } from "uuid"; interface Props { exam: LevelExam; @@ -142,7 +143,7 @@ function TextComponent({
{part.context!.split('\n\n').map((line, index) => { - return

{index + 1}{line}

+ return

{index + 1}{line}

})}
@@ -390,10 +391,7 @@ export default function Level({ exam, showSolutions = false, onFinish, editing = exercisesDone + (exerciseIndex === -1 ? 0 : exerciseIndex + 1) + storeQuestionIndex + - multipleChoicesDone.reduce((acc, curr) => { - console.log(curr.amount); - return acc + curr.amount - }, 0) + multipleChoicesDone.reduce((acc, curr) => { return acc + curr.amount}, 0) ); };