fix(docker): 🐛 Runtime public environment
This commit is contained in:
@ -5,7 +5,7 @@ import { BubbleParams } from 'typebot-js'
|
||||
import { parseInitBubbleCode, typebotJsHtml } from '../params'
|
||||
import { useTypebot } from 'contexts/TypebotContext'
|
||||
import { CodeEditor } from 'components/shared/CodeEditor'
|
||||
import { isEmpty } from 'utils'
|
||||
import { env, isEmpty } from 'utils'
|
||||
|
||||
type ChatEmbedCodeProps = {
|
||||
withStarterVariables?: boolean
|
||||
@ -21,9 +21,9 @@ export const ChatEmbedCode = ({
|
||||
const snippet = prettier.format(
|
||||
createSnippet({
|
||||
url: `${
|
||||
isEmpty(process.env.NEXT_PUBLIC_VIEWER_INTERNAL_URL)
|
||||
? process.env.NEXT_PUBLIC_VIEWER_URL
|
||||
: process.env.NEXT_PUBLIC_VIEWER_INTERNAL_URL
|
||||
isEmpty(env('VIEWER_INTERNAL_URL'))
|
||||
? env('VIEWER_URL')
|
||||
: env('VIEWER_INTERNAL_URL')
|
||||
}/${typebot?.publicId}`,
|
||||
button,
|
||||
proactiveMessage,
|
||||
|
Reference in New Issue
Block a user