frontPanel/src/pages/Questions/QuestionSwitchWindowTool.tsx

24 lines
750 B
TypeScript
Raw Normal View History

2023-11-29 15:45:15 +00:00
import {
Box,
} from "@mui/material";
import { DraggableList } from "./DraggableList";
import { BranchingPanel } from "./BranchingPanel";
import { BranchingMap } from "./BranchingMap";
import { updateOpenBranchingPanel } from "@root/questions/actions";
import {useQuestionsStore} from "@root/questions/store";
2023-11-29 15:45:15 +00:00
export const QuestionSwitchWindowTool = () => {
const {openBranchingPanel} = useQuestionsStore.getState()
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>
<BranchingPanel
/>
</Box>
)
}