2
0

feat(app): Add support bubble

This commit is contained in:
Baptiste Arnaud
2022-02-14 11:33:38 +01:00
parent 8501d39234
commit f897102219
5 changed files with 29 additions and 3 deletions

View File

@ -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>`

View 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 <></>
}