frontPanel/src/pages/Questions/PageOptions/switchPageOptions.tsx

28 lines
613 B
TypeScript
Raw Normal View History

import BranchingQuestions from "../branchingQuestions";
import HelpQuestions from "../helpQuestions";
import SettingPageOptions from "./SettingPageOptions";
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 SwitchPageOptions({
switchState = "setting",
totalIndex,
}: Props) {
switch (switchState) {
case "setting":
return <SettingPageOptions />;
break;
case "help":
return <HelpQuestions totalIndex={totalIndex} />;
break;
case "branching":
return <BranchingQuestions />;
break;
default:
return <></>;
}
}