feat(app): ✨ Add support bubble
This commit is contained in:
@ -139,4 +139,4 @@ export const parseInitBubbleCode = ({
|
||||
)
|
||||
}
|
||||
|
||||
export const typebotJsHtml = `<script src="https://unpkg.com/typebot-js@2.0.20"></script>`
|
||||
export const typebotJsHtml = `<script src="https://unpkg.com/typebot-js@2.1.0"></script>`
|
||||
|
19
apps/builder/components/shared/SupportBubble.tsx
Normal file
19
apps/builder/components/shared/SupportBubble.tsx
Normal file
@ -0,0 +1,19 @@
|
||||
import { useRouter } from 'next/router'
|
||||
import React, { useEffect } from 'react'
|
||||
import { initBubble } from 'typebot-js'
|
||||
|
||||
export const SupportBubble = () => {
|
||||
const router = useRouter()
|
||||
|
||||
useEffect(() => {
|
||||
initBubble({
|
||||
publishId: 'typebot-support',
|
||||
viewerHost: process.env.NEXT_PUBLIC_VIEWER_HOST,
|
||||
backgroundColor: '#ffffff',
|
||||
button: { color: '#0042DA' },
|
||||
})
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [router])
|
||||
|
||||
return <></>
|
||||
}
|
Reference in New Issue
Block a user