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

23 lines
543 B
TypeScript
Raw Normal View History

import { QuizQuestionPage } from "@model/questionTypes/page";
import HelpQuestions from "../helpQuestions";
import SettingPageOptions from "./SettingPageOptions";
interface Props {
2023-12-31 02:53:25 +00:00
switchState: string;
question: QuizQuestionPage;
}
2023-08-24 11:09:47 +00:00
export default function SwitchPageOptions({
2023-12-31 02:53:25 +00:00
switchState = "setting",
question,
2023-08-24 11:09:47 +00:00
}: Props) {
2023-12-31 02:53:25 +00:00
switch (switchState) {
case "setting":
return <SettingPageOptions question={question} />;
case "help":
return <HelpQuestions question={question} />;
default:
return <></>;
}
2023-08-24 11:09:47 +00:00
}