2023-09-15 12:37:12 +00:00
|
|
|
import * as React from "react";
|
2023-06-30 14:39:07 +00:00
|
|
|
import StepOne from "../pages/startPage/stepOne";
|
|
|
|
import Steptwo from "../pages/startPage/steptwo";
|
|
|
|
import StartPageSettings from "../pages/startPage/StartPageSettings";
|
|
|
|
import QuestionsPage from "../pages/Questions/QuestionsPage";
|
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-09-15 12:37:12 +00:00
|
|
|
import { Result } from "../pages/Result/Result";
|
|
|
|
import { Setting } from "../pages/Result/Setting";
|
2023-03-03 20:07:19 +00:00
|
|
|
|
2023-03-03 23:54:19 +00:00
|
|
|
interface Props {
|
2023-09-15 12:37:12 +00:00
|
|
|
activeStep: number;
|
|
|
|
handleNext: () => void;
|
2023-03-03 23:54:19 +00:00
|
|
|
}
|
2023-03-03 20:07:19 +00:00
|
|
|
|
2023-09-15 12:37:12 +00:00
|
|
|
export default function SwitchStepPages({ activeStep = 1, handleNext }: Props) {
|
|
|
|
switch (activeStep) {
|
|
|
|
case 1:
|
|
|
|
return <StepOne handleNext={handleNext} />;
|
|
|
|
case 2:
|
|
|
|
return <Steptwo handleNext={handleNext} />;
|
|
|
|
case 3:
|
|
|
|
return <StartPageSettings handleNext={handleNext} />;
|
|
|
|
case 4:
|
|
|
|
return <QuestionsPage />;
|
|
|
|
case 5:
|
|
|
|
return <Result />;
|
|
|
|
case 6:
|
|
|
|
return <Setting />;
|
|
|
|
case 7:
|
|
|
|
return <ContactFormPage />;
|
|
|
|
case 8:
|
|
|
|
return <InstallQuiz />;
|
|
|
|
default:
|
|
|
|
return <></>;
|
|
|
|
}
|
|
|
|
}
|