From b5a305485f8df26b7f01312a92c3bb0a384dff2b Mon Sep 17 00:00:00 2001 From: Tiago Ribeiro Date: Sat, 27 Jul 2024 14:55:48 +0100 Subject: [PATCH] Finalized the reading generation --- src/pages/(generation)/ReadingGeneration.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pages/(generation)/ReadingGeneration.tsx b/src/pages/(generation)/ReadingGeneration.tsx index 9947117d..c5cb5256 100644 --- a/src/pages/(generation)/ReadingGeneration.tsx +++ b/src/pages/(generation)/ReadingGeneration.tsx @@ -59,6 +59,8 @@ const PartTab = ({ axios .get(`/api/exam/reading/generate/reading_passage_${index}${topic || types ? `?${url.toString()}` : ""}`) .then((result) => { + console.log(result.data); + playSound(typeof result.data === "string" ? "error" : "check"); if (typeof result.data === "string") return toast.error("Something went wrong, please try to generate again."); setPart(result.data); @@ -171,7 +173,7 @@ const PartTab = ({
- {availableTypes.map((x) => ( + {[...availableTypes, ...(index === 3 ? [{type: "ideaMatch", label: "Idea Match"}] : [])].map((x) => ( toggleType(x.type)} key={x.type}