2
0
Files
bot/apps/builder/layouts/theme/ThemeContent.tsx

20 lines
646 B
TypeScript
Raw Normal View History

2021-12-23 09:37:42 +01:00
import { Flex } from '@chakra-ui/react'
import { TypebotViewer } from 'bot-engine'
2022-01-06 09:40:56 +01:00
import { useTypebot } from 'contexts/TypebotContext/TypebotContext'
import React from 'react'
2021-12-23 16:31:56 +01:00
import { parseTypebotToPublicTypebot } from 'services/publicTypebot'
import { ThemeSideMenu } from '../../components/theme/ThemeSideMenu'
2021-12-23 09:37:42 +01:00
export const ThemeContent = () => {
const { typebot } = useTypebot()
const publicTypebot = typebot && parseTypebotToPublicTypebot(typebot)
2021-12-23 09:37:42 +01:00
return (
<Flex h="full" w="full">
<ThemeSideMenu />
2021-12-23 09:37:42 +01:00
<Flex flex="1">
{publicTypebot && <TypebotViewer typebot={publicTypebot} />}
</Flex>
</Flex>
)
}