2
0
Files
bot/apps/builder/layouts/editor/Board.tsx

29 lines
1.0 KiB
TypeScript
Raw Normal View History

2021-12-16 10:43:49 +01:00
import { Flex } from '@chakra-ui/react'
import React from 'react'
import { StepDndContext } from 'contexts/StepDndContext'
import { StepsSideBar } from '../../components/editor/StepsSideBar'
import { PreviewDrawer } from '../../components/editor/preview/PreviewDrawer'
import { RightPanel, useEditor } from 'contexts/EditorContext'
2022-01-03 17:39:59 +01:00
import { GraphProvider } from 'contexts/GraphContext'
import { BoardMenuButton } from '../../components/editor/BoardMenuButton'
import { useTypebot } from 'contexts/TypebotContext'
import { Graph } from 'components/shared/Graph'
2021-12-16 10:43:49 +01:00
export const Board = () => {
const { typebot } = useTypebot()
const { rightPanel } = useEditor()
return (
2021-12-23 09:37:42 +01:00
<Flex flex="1" pos="relative" bgColor="gray.50" h="full">
<StepDndContext>
<StepsSideBar />
<GraphProvider typebot={typebot}>
2022-01-03 17:39:59 +01:00
<Graph flex="1" />
2022-01-19 09:44:21 +01:00
<BoardMenuButton pos="absolute" right="40px" top="20px" />
{rightPanel === RightPanel.PREVIEW && <PreviewDrawer />}
2022-01-03 17:39:59 +01:00
</GraphProvider>
</StepDndContext>
</Flex>
)
}