2
0

build: 👷 New compose file and entrypoints

This commit is contained in:
Baptiste Arnaud
2022-05-25 08:13:35 -07:00
parent 4a5a92b973
commit 5d786f59cc
44 changed files with 288 additions and 113 deletions

View File

@ -4,6 +4,7 @@ import { useTypebot } from 'contexts/TypebotContext'
import parserHtml from 'prettier/parser-html'
import prettier from 'prettier/standalone'
import { PopupParams } from 'typebot-js'
import { isEmpty } from 'utils'
import { parseInitPopupCode, typebotJsHtml } from '../params'
type PopupEmbedCodeProps = {
@ -17,8 +18,9 @@ export const PopupEmbedCode = ({ delay }: PopupEmbedCodeProps & FlexProps) => {
const snippet = prettier.format(
createSnippet({
url: `${
process.env.NEXT_PUBLIC_VIEWER_INTERNAL_URL ??
process.env.NEXT_PUBLIC_VIEWER_URL
isEmpty(process.env.NEXT_PUBLIC_VIEWER_INTERNAL_URL)
? process.env.NEXT_PUBLIC_VIEWER_URL
: process.env.NEXT_PUBLIC_VIEWER_INTERNAL_URL
}/${typebot?.publicId}`,
delay,
}),