2023-11-13 18:04:51 +00:00
|
|
|
|
import { QuizSetupStep } from "@model/quizSettings";
|
|
|
|
|
import { notReachable } from "../utils/notReachable";
|
2023-07-01 23:33:35 +00:00
|
|
|
|
import ContactFormPage from "../pages/ContactFormPage/ContactFormPage";
|
2023-07-06 15:54:12 +00:00
|
|
|
|
import InstallQuiz from "../pages/InstallQuiz/InstallQuiz";
|
2023-11-13 18:04:51 +00:00
|
|
|
|
import FormQuestionsPage from "../pages/Questions/Form/FormQuestionsPage";
|
|
|
|
|
import QuestionsPage from "../pages/Questions/QuestionsPage";
|
|
|
|
|
import { QuestionsMap } from "../pages/QuestionsMap";
|
2023-09-15 12:37:12 +00:00
|
|
|
|
import { Result } from "../pages/Result/Result";
|
|
|
|
|
import { Setting } from "../pages/Result/Setting";
|
2023-11-13 18:04:51 +00:00
|
|
|
|
import StartPageSettings from "../pages/startPage/StartPageSettings";
|
|
|
|
|
import StepOne from "../pages/startPage/stepOne";
|
|
|
|
|
import Steptwo from "../pages/startPage/steptwo";
|
|
|
|
|
|
2023-03-03 20:07:19 +00:00
|
|
|
|
|
2023-03-03 23:54:19 +00:00
|
|
|
|
interface Props {
|
2023-11-13 18:04:51 +00:00
|
|
|
|
activeStep: QuizSetupStep;
|
|
|
|
|
quizType: string;
|
2023-03-03 23:54:19 +00:00
|
|
|
|
}
|
2023-03-03 20:07:19 +00:00
|
|
|
|
|
2023-10-05 10:12:56 +00:00
|
|
|
|
export default function SwitchStepPages({
|
2023-11-13 18:04:51 +00:00
|
|
|
|
activeStep = 1,
|
|
|
|
|
quizType,
|
2023-10-05 10:12:56 +00:00
|
|
|
|
}: Props) {
|
2023-11-13 18:04:51 +00:00
|
|
|
|
switch (activeStep) {
|
|
|
|
|
case 1: return <StepOne />;
|
|
|
|
|
case 2: return <Steptwo />;
|
|
|
|
|
case 3: return <StartPageSettings />;
|
2023-11-14 16:43:21 +00:00
|
|
|
|
case 4: return quizType === "form" ? <FormQuestionsPage /> : <QuestionsPage />;
|
2023-11-13 18:04:51 +00:00
|
|
|
|
case 5: return <Result />;
|
|
|
|
|
case 6: return <Setting />;
|
|
|
|
|
case 7: return <QuestionsMap />;
|
|
|
|
|
case 8: return <ContactFormPage />;
|
|
|
|
|
case 9: return <InstallQuiz />;
|
|
|
|
|
case 10: return <>Реклама</>;
|
|
|
|
|
default: return notReachable(activeStep);
|
|
|
|
|
}
|
2023-09-15 12:37:12 +00:00
|
|
|
|
}
|