🐛 Fix bubble proper cleanup function
This commit is contained in:
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@typebot.io/js",
|
"name": "@typebot.io/js",
|
||||||
"version": "0.0.10",
|
"version": "0.0.11",
|
||||||
"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",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@typebot.io/react",
|
"name": "@typebot.io/react",
|
||||||
"version": "0.0.10",
|
"version": "0.0.11",
|
||||||
"description": "React library to display typebots on your website",
|
"description": "React library to display typebots on your website",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"types": "dist/index.d.ts",
|
"types": "dist/index.d.ts",
|
||||||
|
@ -25,6 +25,9 @@ export const Bubble = (props: Props) => {
|
|||||||
await import('@typebot.io/js/dist/web')
|
await import('@typebot.io/js/dist/web')
|
||||||
setIsInitialized(true)
|
setIsInitialized(true)
|
||||||
})()
|
})()
|
||||||
|
return () => {
|
||||||
|
ref.current?.remove()
|
||||||
|
}
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
const attachBubbleToDom = useCallback((props: Props) => {
|
const attachBubbleToDom = useCallback((props: Props) => {
|
||||||
|
Reference in New Issue
Block a user