Removed the persistence for the Speaking exam for now

This commit is contained in:
Tiago Ribeiro
2024-06-08 10:39:26 +01:00
parent daec246835
commit 9959cf4294
4 changed files with 8 additions and 24 deletions

View File

@@ -74,26 +74,18 @@ export default function Speaking({id, title, text, video_url, type, prompts, use
}, [isRecording]);
const next = async () => {
setIsLoading(true);
const storagePath = await saveToStorage();
setIsLoading(false);
onNext({
exercise: id,
solutions: storagePath ? [{id, solution: storagePath}] : [],
solutions: mediaBlob ? [{id, solution: mediaBlob}] : [],
score: {correct: 0, total: 100, missing: 0},
type,
});
};
const back = async () => {
setIsLoading(true);
const storagePath = await saveToStorage();
setIsLoading(false);
onBack({
exercise: id,
solutions: storagePath ? [{id, solution: storagePath}] : [],
solutions: mediaBlob ? [{id, solution: mediaBlob}] : [],
score: {correct: 0, total: 100, missing: 0},
type,
});