frontPanel/src/pages/Questions/OptionsAndPicture/switchOptionsAndPict.tsx

33 lines
760 B
TypeScript
Raw Normal View History

2023-08-24 11:09:47 +00:00
import * as React from "react";
import BranchingQuestions from "../branchingQuestions";
import SettingOptionsAndPict from "./SettingOptionsAndPict";
import HelpQuestions from "../helpQuestions";
import UploadImage from "../UploadImage";
interface Props {
2023-08-24 11:09:47 +00:00
switchState: string;
totalIndex: number;
}
2023-08-24 11:09:47 +00:00
export default function SwitchOptionsAndPict({
switchState = "setting",
totalIndex,
}: Props) {
switch (switchState) {
case "setting":
return <SettingOptionsAndPict />;
break;
case "help":
return <HelpQuestions totalIndex={totalIndex} />;
break;
case "branching":
return <BranchingQuestions />;
break;
case "image":
return <UploadImage />;
break;
default:
return <></>;
}
}