Created the InteractiveSpeaking exercise
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import {
|
||||
Exercise,
|
||||
FillBlanksExercise,
|
||||
InteractiveSpeakingExercise,
|
||||
MatchSentencesExercise,
|
||||
MultipleChoiceExercise,
|
||||
SpeakingExercise,
|
||||
@@ -11,6 +12,7 @@ import {
|
||||
} from "@/interfaces/exam";
|
||||
import dynamic from "next/dynamic";
|
||||
import FillBlanks from "./FillBlanks";
|
||||
import InteractiveSpeaking from "./InteractiveSpeaking";
|
||||
import MultipleChoice from "./MultipleChoice";
|
||||
import Speaking from "./Speaking";
|
||||
import TrueFalseSolution from "./TrueFalse";
|
||||
@@ -25,6 +27,8 @@ export interface CommonProps {
|
||||
}
|
||||
|
||||
export const renderSolution = (exercise: Exercise, onNext: () => void, onBack: () => void) => {
|
||||
console.log(exercise);
|
||||
|
||||
switch (exercise.type) {
|
||||
case "fillBlanks":
|
||||
return <FillBlanks {...(exercise as FillBlanksExercise)} onNext={onNext} onBack={onBack} />;
|
||||
@@ -40,5 +44,7 @@ export const renderSolution = (exercise: Exercise, onNext: () => void, onBack: (
|
||||
return <Writing {...(exercise as WritingExercise)} onNext={onNext} onBack={onBack} />;
|
||||
case "speaking":
|
||||
return <Speaking {...(exercise as SpeakingExercise)} onNext={onNext} onBack={onBack} />;
|
||||
case "interactiveSpeaking":
|
||||
return <InteractiveSpeaking {...(exercise as InteractiveSpeakingExercise)} onNext={onNext} onBack={onBack} />;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user