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'
|
2022-02-04 19:00:08 +01:00
|
|
|
import React from 'react'
|
2021-12-23 16:31:56 +01:00
|
|
|
import { parseTypebotToPublicTypebot } from 'services/publicTypebot'
|
2022-01-25 18:19:37 +01:00
|
|
|
import { ThemeSideMenu } from '../../components/theme/ThemeSideMenu'
|
2021-12-23 09:37:42 +01:00
|
|
|
|
|
|
|
export const ThemeContent = () => {
|
|
|
|
const { typebot } = useTypebot()
|
2022-02-04 19:00:08 +01:00
|
|
|
const publicTypebot = typebot && parseTypebotToPublicTypebot(typebot)
|
2021-12-23 09:37:42 +01:00
|
|
|
return (
|
|
|
|
<Flex h="full" w="full">
|
2022-01-25 18:19:37 +01:00
|
|
|
<ThemeSideMenu />
|
2021-12-23 09:37:42 +01:00
|
|
|
<Flex flex="1">
|
|
|
|
{publicTypebot && <TypebotViewer typebot={publicTypebot} />}
|
|
|
|
</Flex>
|
|
|
|
</Flex>
|
|
|
|
)
|
|
|
|
}
|