frontPanel/src/pages/Questions/PageOptions/switchPageOptions.tsx
2023-09-08 16:42:52 +03:00

28 lines
661 B
TypeScript

import BranchingQuestions from "../branchingQuestions";
import HelpQuestions from "../helpQuestions";
import SettingPageOptions from "./SettingPageOptions";
interface Props {
switchState: string;
totalIndex: number;
}
export default function SwitchPageOptions({
switchState = "setting",
totalIndex,
}: Props) {
switch (switchState) {
case "setting":
return <SettingPageOptions totalIndex={totalIndex} />;
break;
case "help":
return <HelpQuestions totalIndex={totalIndex} />;
break;
case "branching":
return <BranchingQuestions totalIndex={totalIndex} />;
break;
default:
return <></>;
}
}