2
0
Files
bot/apps/builder/components/board/Board.tsx

24 lines
738 B
TypeScript
Raw Normal View History

2021-12-16 10:43:49 +01:00
import { Flex } from '@chakra-ui/react'
import React from 'react'
import Graph from './graph/Graph'
import { DndContext } from 'contexts/DndContext'
import { StepTypesList } from './StepTypesList'
import { PreviewDrawer } from './preview/PreviewDrawer'
import { RightPanel, useEditor } from 'contexts/EditorContext'
2022-01-03 17:39:59 +01:00
import { GraphProvider } from 'contexts/GraphContext'
2021-12-16 10:43:49 +01:00
export const Board = () => {
const { rightPanel } = useEditor()
return (
2021-12-23 09:37:42 +01:00
<Flex flex="1" pos="relative" bgColor="gray.50" h="full">
<DndContext>
<StepTypesList />
2022-01-03 17:39:59 +01:00
<GraphProvider>
<Graph flex="1" />
2022-01-06 16:54:23 +01:00
{rightPanel === RightPanel.PREVIEW && <PreviewDrawer />}
2022-01-03 17:39:59 +01:00
</GraphProvider>
</DndContext>
</Flex>
)
}