frontPanel/src/pages/Questions/QuestionSwitchWindowTool.tsx

23 lines
751 B
TypeScript
Raw Normal View History

2023-11-29 15:45:15 +00:00
import {
Box,
} from "@mui/material";
import { DraggableList } from "./DraggableList";
import { SwitchBranchingPanel } from "./SwitchBranchingPanel";
2023-11-29 15:45:15 +00:00
import { BranchingMap } from "./BranchingMap";
import {useQuestionsStore} from "@root/questions/store";
2023-11-29 15:45:15 +00:00
export const QuestionSwitchWindowTool = () => {
2023-12-09 13:27:31 +00:00
const {openBranchingPanel, questions} = useQuestionsStore.getState()
console.log("questions ", questions)
2023-11-29 15:45:15 +00:00
return (
<Box sx={{ display: "flex", gap: "20px", flexWrap: "wrap" }}>
<Box sx={{ flexBasis: "796px" }}>
{openBranchingPanel? <BranchingMap /> : <DraggableList />}
2023-11-29 15:45:15 +00:00
</Box>
<SwitchBranchingPanel
2023-11-29 15:45:15 +00:00
/>
</Box>
)
}