docs(share): 📝 Update typebot URL in embed instructions
This commit is contained in:
@@ -19,7 +19,10 @@ export const ChatEmbedCode = ({
|
|||||||
|
|
||||||
const snippet = prettier.format(
|
const snippet = prettier.format(
|
||||||
createSnippet({
|
createSnippet({
|
||||||
url: `${process.env.NEXT_PUBLIC_VIEWER_URL}/${typebot?.publicId}`,
|
url: `${
|
||||||
|
process.env.NEXT_PUBLIC_VIEWER_INTERNAL_URL ??
|
||||||
|
process.env.NEXT_PUBLIC_VIEWER_URL
|
||||||
|
}/${typebot?.publicId}`,
|
||||||
button,
|
button,
|
||||||
proactiveMessage,
|
proactiveMessage,
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -21,7 +21,10 @@ export const ContainerEmbedCode = ({
|
|||||||
|
|
||||||
const snippet = prettier.format(
|
const snippet = prettier.format(
|
||||||
parseSnippet({
|
parseSnippet({
|
||||||
url: `${process.env.NEXT_PUBLIC_VIEWER_URL}/${typebot?.publicId}`,
|
url: `${
|
||||||
|
process.env.NEXT_PUBLIC_VIEWER_INTERNAL_URL ??
|
||||||
|
process.env.NEXT_PUBLIC_VIEWER_URL
|
||||||
|
}/${typebot?.publicId}`,
|
||||||
heightLabel,
|
heightLabel,
|
||||||
widthLabel,
|
widthLabel,
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -12,7 +12,10 @@ export const IframeEmbedCode = ({
|
|||||||
heightLabel,
|
heightLabel,
|
||||||
}: Props & FlexProps) => {
|
}: Props & FlexProps) => {
|
||||||
const { typebot } = useTypebot()
|
const { typebot } = useTypebot()
|
||||||
const src = `${process.env.NEXT_PUBLIC_VIEWER_URL}/${typebot?.publicId}`
|
const src = `${
|
||||||
|
process.env.NEXT_PUBLIC_VIEWER_INTERNAL_URL ??
|
||||||
|
process.env.NEXT_PUBLIC_VIEWER_URL
|
||||||
|
}/${typebot?.publicId}`
|
||||||
const code = `<iframe src="${src}" width="${widthLabel}" height="${heightLabel}" />`
|
const code = `<iframe src="${src}" width="${widthLabel}" height="${heightLabel}" />`
|
||||||
|
|
||||||
return <CodeEditor value={code} lang="html" isReadOnly />
|
return <CodeEditor value={code} lang="html" isReadOnly />
|
||||||
|
|||||||
@@ -16,7 +16,10 @@ export const PopupEmbedCode = ({ delay }: PopupEmbedCodeProps & FlexProps) => {
|
|||||||
const { typebot } = useTypebot()
|
const { typebot } = useTypebot()
|
||||||
const snippet = prettier.format(
|
const snippet = prettier.format(
|
||||||
createSnippet({
|
createSnippet({
|
||||||
url: `${process.env.NEXT_PUBLIC_VIEWER_URL}/${typebot?.publicId}`,
|
url: `${
|
||||||
|
process.env.NEXT_PUBLIC_VIEWER_INTERNAL_URL ??
|
||||||
|
process.env.NEXT_PUBLIC_VIEWER_URL
|
||||||
|
}/${typebot?.publicId}`,
|
||||||
delay,
|
delay,
|
||||||
}),
|
}),
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -19,7 +19,10 @@ export const StandardReactDiv = ({
|
|||||||
const { typebot } = useTypebot()
|
const { typebot } = useTypebot()
|
||||||
const snippet = prettier.format(
|
const snippet = prettier.format(
|
||||||
parseContainerSnippet({
|
parseContainerSnippet({
|
||||||
url: `${process.env.NEXT_PUBLIC_VIEWER_URL}/${typebot?.publicId}`,
|
url: `${
|
||||||
|
process.env.NEXT_PUBLIC_VIEWER_INTERNAL_URL ??
|
||||||
|
process.env.NEXT_PUBLIC_VIEWER_URL
|
||||||
|
}/${typebot?.publicId}`,
|
||||||
heightLabel,
|
heightLabel,
|
||||||
widthLabel,
|
widthLabel,
|
||||||
}),
|
}),
|
||||||
@@ -67,7 +70,10 @@ export const PopupReactCode = ({ delay }: PopupEmbedCodeProps & FlexProps) => {
|
|||||||
const { typebot } = useTypebot()
|
const { typebot } = useTypebot()
|
||||||
const snippet = prettier.format(
|
const snippet = prettier.format(
|
||||||
parsePopupSnippet({
|
parsePopupSnippet({
|
||||||
url: `${process.env.NEXT_PUBLIC_VIEWER_URL}/${typebot?.publicId}`,
|
url: `${
|
||||||
|
process.env.NEXT_PUBLIC_VIEWER_INTERNAL_URL ??
|
||||||
|
process.env.NEXT_PUBLIC_VIEWER_URL
|
||||||
|
}/${typebot?.publicId}`,
|
||||||
delay,
|
delay,
|
||||||
}),
|
}),
|
||||||
{
|
{
|
||||||
@@ -114,7 +120,10 @@ export const ChatReactCode = ({
|
|||||||
const { typebot } = useTypebot()
|
const { typebot } = useTypebot()
|
||||||
const snippet = prettier.format(
|
const snippet = prettier.format(
|
||||||
parseBubbleSnippet({
|
parseBubbleSnippet({
|
||||||
url: `${process.env.NEXT_PUBLIC_VIEWER_URL}/${typebot?.publicId}`,
|
url: `${
|
||||||
|
process.env.NEXT_PUBLIC_VIEWER_INTERNAL_URL ??
|
||||||
|
process.env.NEXT_PUBLIC_VIEWER_URL
|
||||||
|
}/${typebot?.publicId}`,
|
||||||
button,
|
button,
|
||||||
proactiveMessage,
|
proactiveMessage,
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -39,7 +39,10 @@ const StandardInstructions = ({ publicId }: Pick<ModalProps, 'publicId'>) => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
const jsCode = parseInitContainerCode({
|
const jsCode = parseInitContainerCode({
|
||||||
url: `${process.env.NEXT_PUBLIC_VIEWER_URL}/${publicId}`,
|
url: `${
|
||||||
|
process.env.NEXT_PUBLIC_VIEWER_INTERNAL_URL ??
|
||||||
|
process.env.NEXT_PUBLIC_VIEWER_URL
|
||||||
|
}/${publicId}`,
|
||||||
})
|
})
|
||||||
const headCode = `${typebotJsHtml}
|
const headCode = `${typebotJsHtml}
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
@@ -44,11 +44,17 @@ export const NotionModal = ({
|
|||||||
<Input
|
<Input
|
||||||
pr="4.5rem"
|
pr="4.5rem"
|
||||||
type={'text'}
|
type={'text'}
|
||||||
defaultValue={`${process.env.NEXT_PUBLIC_VIEWER_URL}/${publicId}`}
|
defaultValue={`${
|
||||||
|
process.env.NEXT_PUBLIC_VIEWER_INTERNAL_URL ??
|
||||||
|
process.env.NEXT_PUBLIC_VIEWER_URL
|
||||||
|
}/${publicId}`}
|
||||||
/>
|
/>
|
||||||
<InputRightElement width="4.5rem">
|
<InputRightElement width="4.5rem">
|
||||||
<CopyButton
|
<CopyButton
|
||||||
textToCopy={`${process.env.NEXT_PUBLIC_VIEWER_URL}/${publicId}`}
|
textToCopy={`${
|
||||||
|
process.env.NEXT_PUBLIC_VIEWER_INTERNAL_URL ??
|
||||||
|
process.env.NEXT_PUBLIC_VIEWER_URL
|
||||||
|
}/${publicId}`}
|
||||||
/>
|
/>
|
||||||
</InputRightElement>
|
</InputRightElement>
|
||||||
</InputGroup>
|
</InputGroup>
|
||||||
|
|||||||
@@ -44,7 +44,10 @@ const StandardInstructions = ({ publicId }: Pick<ModalProps, 'publicId'>) => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
const jsCode = parseInitContainerCode({
|
const jsCode = parseInitContainerCode({
|
||||||
url: `${process.env.NEXT_PUBLIC_VIEWER_URL}/${publicId}`,
|
url: `${
|
||||||
|
process.env.NEXT_PUBLIC_VIEWER_INTERNAL_URL ??
|
||||||
|
process.env.NEXT_PUBLIC_VIEWER_URL
|
||||||
|
}/${publicId}`,
|
||||||
})
|
})
|
||||||
const headCode = prettier.format(
|
const headCode = prettier.format(
|
||||||
`${typebotJsHtml}<script>${jsCode}</script>`,
|
`${typebotJsHtml}<script>${jsCode}</script>`,
|
||||||
|
|||||||
@@ -53,11 +53,17 @@ export const WordpressModal = ({
|
|||||||
<Input
|
<Input
|
||||||
pr="4.5rem"
|
pr="4.5rem"
|
||||||
type={'text'}
|
type={'text'}
|
||||||
defaultValue={`${process.env.NEXT_PUBLIC_VIEWER_URL}/${publicId}`}
|
defaultValue={`${
|
||||||
|
process.env.NEXT_PUBLIC_VIEWER_INTERNAL_URL ??
|
||||||
|
process.env.NEXT_PUBLIC_VIEWER_URL
|
||||||
|
}/${publicId}`}
|
||||||
/>
|
/>
|
||||||
<InputRightElement width="4.5rem">
|
<InputRightElement width="4.5rem">
|
||||||
<CopyButton
|
<CopyButton
|
||||||
textToCopy={`${process.env.NEXT_PUBLIC_VIEWER_URL}/${publicId}`}
|
textToCopy={`${
|
||||||
|
process.env.NEXT_PUBLIC_VIEWER_INTERNAL_URL ??
|
||||||
|
process.env.NEXT_PUBLIC_VIEWER_URL
|
||||||
|
}/${publicId}`}
|
||||||
/>
|
/>
|
||||||
</InputRightElement>
|
</InputRightElement>
|
||||||
</InputGroup>
|
</InputGroup>
|
||||||
|
|||||||
@@ -12,7 +12,10 @@ export const SupportBubble = () => {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (isCloudProdInstance())
|
if (isCloudProdInstance())
|
||||||
initBubble({
|
initBubble({
|
||||||
url: `${process.env.NEXT_PUBLIC_VIEWER_URL}/typebot-support`,
|
url: `${
|
||||||
|
process.env.NEXT_PUBLIC_VIEWER_INTERNAL_URL ??
|
||||||
|
process.env.NEXT_PUBLIC_VIEWER_URL
|
||||||
|
}/typebot-support`,
|
||||||
backgroundColor: '#ffffff',
|
backgroundColor: '#ffffff',
|
||||||
button: { color: '#0042DA' },
|
button: { color: '#0042DA' },
|
||||||
hiddenVariables: {
|
hiddenVariables: {
|
||||||
|
|||||||
Reference in New Issue
Block a user