🐛 Chatwoot widget open should not unmount bot if standard or popup
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@typebot.io/js",
|
"name": "@typebot.io/js",
|
||||||
"version": "0.2.29",
|
"version": "0.2.30",
|
||||||
"description": "Javascript library to display typebots on your website",
|
"description": "Javascript library to display typebots on your website",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
|
|||||||
@@ -85,7 +85,6 @@ export const Popup = (props: PopupProps) => {
|
|||||||
...existingPrefilledVariables,
|
...existingPrefilledVariables,
|
||||||
...data.variables,
|
...data.variables,
|
||||||
}))
|
}))
|
||||||
if (data.command === 'unmount') closeBot()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const openBot = () => {
|
const openBot = () => {
|
||||||
|
|||||||
@@ -35,7 +35,6 @@ export const Standard = (
|
|||||||
const processIncomingEvent = (event: MessageEvent<CommandData>) => {
|
const processIncomingEvent = (event: MessageEvent<CommandData>) => {
|
||||||
const { data } = event
|
const { data } = event
|
||||||
if (!data.isFromTypebot) return
|
if (!data.isFromTypebot) return
|
||||||
if (data.command === 'unmount') setIsBotDisplayed(false)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
onCleanup(() => {
|
onCleanup(() => {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@typebot.io/nextjs",
|
"name": "@typebot.io/nextjs",
|
||||||
"version": "0.2.29",
|
"version": "0.2.30",
|
||||||
"description": "Convenient library to display typebots on your Next.js website",
|
"description": "Convenient library to display typebots on your Next.js website",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"types": "dist/index.d.ts",
|
"types": "dist/index.d.ts",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@typebot.io/react",
|
"name": "@typebot.io/react",
|
||||||
"version": "0.2.29",
|
"version": "0.2.30",
|
||||||
"description": "Convenient library to display typebots on your React app",
|
"description": "Convenient library to display typebots on your React app",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"types": "dist/index.d.ts",
|
"types": "dist/index.d.ts",
|
||||||
|
|||||||
Reference in New Issue
Block a user