Finalized the reading generation
This commit is contained in:
@@ -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 = ({
|
||||
<div className="flex flex-col gap-3">
|
||||
<label className="font-normal text-base text-mti-gray-dim">Exercises</label>
|
||||
<div className="flex flex-row -2xl:flex-wrap w-full gap-4 -md:justify-center justify-between">
|
||||
{availableTypes.map((x) => (
|
||||
{[...availableTypes, ...(index === 3 ? [{type: "ideaMatch", label: "Idea Match"}] : [])].map((x) => (
|
||||
<span
|
||||
onClick={() => toggleType(x.type)}
|
||||
key={x.type}
|
||||
|
||||
Reference in New Issue
Block a user