Updated and fixed part of the partial test generation
This commit is contained in:
@@ -21,7 +21,8 @@ const PartTab = ({part, index, setPart}: {part?: SpeakingPart; index: number; se
|
||||
axios
|
||||
.get(`/api/exam/speaking/generate/speaking_task_${index}`)
|
||||
.then((result) => {
|
||||
playSound("check");
|
||||
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);
|
||||
})
|
||||
.catch((error) => {
|
||||
|
||||
Reference in New Issue
Block a user