fix(embed): 📝 initContainer typo
This commit is contained in:
@ -50,7 +50,7 @@ const parseContainerSnippet = ({
|
|||||||
backgroundColor,
|
backgroundColor,
|
||||||
hiddenVariables,
|
hiddenVariables,
|
||||||
})
|
})
|
||||||
return `import {initContainer} from "typebot-js";
|
return `import Typebot from "typebot-js";
|
||||||
|
|
||||||
const Component = () => {
|
const Component = () => {
|
||||||
useEffect(()=> {
|
useEffect(()=> {
|
||||||
@ -98,7 +98,7 @@ const parsePopupSnippet = ({
|
|||||||
hiddenVariables,
|
hiddenVariables,
|
||||||
delay,
|
delay,
|
||||||
})
|
})
|
||||||
return `import {initPopup} from "typebot-js";
|
return `import Typebot from "typebot-js";
|
||||||
|
|
||||||
const Component = () => {
|
const Component = () => {
|
||||||
useEffect(()=> {
|
useEffect(()=> {
|
||||||
@ -151,7 +151,7 @@ const parseBubbleSnippet = ({
|
|||||||
proactiveMessage,
|
proactiveMessage,
|
||||||
button,
|
button,
|
||||||
})
|
})
|
||||||
return `import {initBubble} from "typebot-js";
|
return `import Typebot from "typebot-js";
|
||||||
|
|
||||||
const Component = () => {
|
const Component = () => {
|
||||||
useEffect(()=> {
|
useEffect(()=> {
|
||||||
|
@ -88,7 +88,7 @@ export const parseInitContainerCode = ({
|
|||||||
backgroundColor,
|
backgroundColor,
|
||||||
})
|
})
|
||||||
return prettier.format(
|
return prettier.format(
|
||||||
`initContainer("typebot-container", {
|
`Typebot.initContainer("typebot-container", {
|
||||||
url: "${url}",${bgColorString}${customDomainString}${hiddenVariablesString}
|
url: "${url}",${bgColorString}${customDomainString}${hiddenVariablesString}
|
||||||
});`,
|
});`,
|
||||||
{ parser: 'babel', plugins: [parserBabel] }
|
{ parser: 'babel', plugins: [parserBabel] }
|
||||||
@ -110,7 +110,7 @@ export const parseInitPopupCode = ({
|
|||||||
})
|
})
|
||||||
const { delayString } = parsePopupParams({ delay })
|
const { delayString } = parsePopupParams({ delay })
|
||||||
return prettier.format(
|
return prettier.format(
|
||||||
`var typebotCommands = initPopup({url: "${url}",${delayString}${bgColorString}${customDomainString}${hiddenVariablesString}});`,
|
`var typebotCommands = Typebot.initPopup({url: "${url}",${delayString}${bgColorString}${customDomainString}${hiddenVariablesString}});`,
|
||||||
{ parser: 'babel', plugins: [parserBabel] }
|
{ parser: 'babel', plugins: [parserBabel] }
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@ -134,7 +134,7 @@ export const parseInitBubbleCode = ({
|
|||||||
proactiveMessage,
|
proactiveMessage,
|
||||||
})
|
})
|
||||||
return prettier.format(
|
return prettier.format(
|
||||||
`var typebotCommands = initBubble({url: "${url}",${bgColorString}${customDomainString}${hiddenVariablesString}${proactiveMessageString}${buttonString}});`,
|
`var typebotCommands = Typebot.initBubble({url: "${url}",${bgColorString}${customDomainString}${hiddenVariablesString}${proactiveMessageString}${buttonString}});`,
|
||||||
{ parser: 'babel', plugins: [parserBabel] }
|
{ parser: 'babel', plugins: [parserBabel] }
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user