Added Speaking to level, fixed a bug where it was causing level to crash if the listening was already created and the section was switched, added true false exercises to listening
This commit is contained in:
@@ -51,6 +51,12 @@ const ListeningContext: React.FC<Props> = ({ sectionId, module, listeningSection
|
||||
},
|
||||
});
|
||||
|
||||
useEffect(()=> {
|
||||
if (listeningPart.script == undefined) {
|
||||
setScriptLocal(undefined);
|
||||
}
|
||||
}, [listeningPart])
|
||||
|
||||
useEffect(() => {
|
||||
if (genResult && generating === "listeningScript") {
|
||||
setEditing(true);
|
||||
|
||||
@@ -55,6 +55,13 @@ const ReadingContext: React.FC<Props> = ({ sectionId, module, level = false }) =
|
||||
}
|
||||
});
|
||||
|
||||
useEffect(()=> {
|
||||
if (readingPart.text === undefined) {
|
||||
setTitle('');
|
||||
setContent('');
|
||||
}
|
||||
}, [readingPart])
|
||||
|
||||
useEffect(() => {
|
||||
if (genResult && genResult.generating === "passage") {
|
||||
setEditing(true);
|
||||
|
||||
Reference in New Issue
Block a user