2023-03-03 20:07:19 +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";
|
|
|
|
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 {
|
|
|
|
activeStep: number,
|
|
|
|
handleNext: () => void
|
|
|
|
}
|
2023-03-03 20:07:19 +00:00
|
|
|
|
2023-03-03 23:54:19 +00:00
|
|
|
export default function SwitchStepPages({activeStep = 1, handleNext }: Props) {
|
|
|
|
|
|
|
|
switch (activeStep) {
|
2023-06-28 23:32:43 +00:00
|
|
|
case 1:
|
2023-03-03 23:54:19 +00:00
|
|
|
return (<StepOne handleNext={handleNext}/>);
|
2023-06-28 23:32:43 +00:00
|
|
|
case 2:
|
2023-03-03 23:54:19 +00:00
|
|
|
return (<Steptwo handleNext={handleNext}/>);
|
2023-06-28 23:32:43 +00:00
|
|
|
case 3:
|
|
|
|
return (<StartPageSettings handleNext={handleNext}/>);
|
2023-06-30 14:39:07 +00:00
|
|
|
case 4:
|
|
|
|
return (<QuestionsPage/>);
|
|
|
|
case 5:
|
2023-07-06 15:54:12 +00:00
|
|
|
return (<Result/>);
|
2023-06-30 14:39:07 +00:00
|
|
|
case 6:
|
2023-07-06 15:54:12 +00:00
|
|
|
return (<Setting/>);
|
|
|
|
case 7:
|
|
|
|
return (<ContactFormPage/>);
|
|
|
|
case 8:
|
|
|
|
return (<InstallQuiz/>);
|
2023-03-03 23:54:19 +00:00
|
|
|
default:
|
|
|
|
return (<></>)
|
2023-03-03 20:07:19 +00:00
|
|
|
}
|
|
|
|
}
|