Introduce bot v2 in builder (#328)

Also, the new engine is the default for updated typebots for viewer

Closes #211
This commit is contained in:
Baptiste Arnaud
2023-02-21 15:25:14 +01:00
committed by GitHub
parent 527dc8a5b1
commit debdac12ff
208 changed files with 4462 additions and 5236 deletions

View File

@@ -9,7 +9,7 @@ type Props = {
export const CustomCssSettings = ({ customCss, onCustomCssChange }: Props) => {
return (
<CodeEditor
value={customCss ?? ''}
defaultValue={customCss ?? ''}
lang="css"
onChange={onCustomCssChange}
/>

View File

@@ -1,14 +1,11 @@
import { Seo } from '@/components/Seo'
import { TypebotHeader, useTypebot } from '@/features/editor'
import { Flex } from '@chakra-ui/react'
import { TypebotViewer } from 'bot-engine'
import { getViewerUrl } from 'utils'
import { Standard } from '@typebot.io/react'
import { ThemeSideMenu } from './ThemeSideMenu'
import { parseTypebotToPublicTypebot } from '@/features/publish'
export const ThemePage = () => {
const { typebot } = useTypebot()
const publicTypebot = typebot && parseTypebotToPublicTypebot(typebot)
return (
<Flex overflow="hidden" h="100vh" flexDir="column">
@@ -16,9 +13,15 @@ export const ThemePage = () => {
<TypebotHeader />
<Flex h="full" w="full">
<ThemeSideMenu />
<Flex flex="1" overflow="hidden">
{publicTypebot && (
<TypebotViewer apiHost={getViewerUrl()} typebot={publicTypebot} />
<Flex flex="1">
{typebot && (
<Standard
typebot={typebot}
style={{
width: '100%',
height: '100%',
}}
/>
)}
</Flex>
</Flex>

View File

@@ -38,6 +38,7 @@ export const ThemeSideMenu = () => {
spacing={10}
overflowY="scroll"
pb="20"
position="relative"
>
<Heading fontSize="xl" textAlign="center">
Customize the theme