diff --git a/src/components/Exercises/FillBlanks/index.tsx b/src/components/Exercises/FillBlanks/index.tsx index a00c3bb2..f8419b7d 100644 --- a/src/components/Exercises/FillBlanks/index.tsx +++ b/src/components/Exercises/FillBlanks/index.tsx @@ -55,10 +55,11 @@ const FillBlanks: React.FC = ({ const solution = solutions.find((y) => x.id.toString() === y.id.toString())?.solution; if (!solution) return false; const option = correctWords!.find((w: any) => { + console.log(w); if (typeof w === "string") { return w.toLowerCase() === x.solution.toLowerCase(); } else if ('letter' in w) { - return w.word.toLowerCase() === x.solution.toLowerCase(); + return w.letter.toLowerCase() === x.solution.toLowerCase(); } else { return w.id.toString() === x.id.toString(); } @@ -138,9 +139,10 @@ const FillBlanks: React.FC = ({ } useEffect(() => { - if (variant === "mc") { + //if (variant === "mc") { + console.log(answers); setCurrentSolution({ exercise: id, solutions: answers, score: calculateScore(), type, shuffleMaps: shuffleMaps }); - } + //} // eslint-disable-next-line react-hooks/exhaustive-deps }, [answers]) diff --git a/src/components/Solutions/FillBlanks.tsx b/src/components/Solutions/FillBlanks.tsx index 92dee6b5..8a947473 100644 --- a/src/components/Solutions/FillBlanks.tsx +++ b/src/components/Solutions/FillBlanks.tsx @@ -34,7 +34,7 @@ export default function FillBlanksSolutions({ if (typeof w === "string") { return w.toLowerCase() === x.solution.toLowerCase(); } else if ('letter' in w) { - return w.word.toLowerCase() === x.solution.toLowerCase(); + return w.letter.toLowerCase() === x.solution.toLowerCase(); } else { return w.id.toString() === x.id.toString(); }