Skip to content

Commit

Permalink
fix: 🐛 Typebot support bubble hidden vars
Browse files Browse the repository at this point in the history
  • Loading branch information
baptisteArno committed Feb 19, 2022
1 parent b89e9b1 commit 341cd15
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions apps/builder/components/shared/SupportBubble.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import { useTypebot } from 'contexts/TypebotContext'
import { useUser } from 'contexts/UserContext'
import { useRouter } from 'next/router'
import React, { useEffect } from 'react'
import { initBubble } from 'typebot-js'

export const SupportBubble = () => {
const { typebot } = useTypebot()
const { user } = useUser()
const router = useRouter()

useEffect(() => {
initBubble({
Expand All @@ -16,14 +14,14 @@ export const SupportBubble = () => {
backgroundColor: '#ffffff',
button: { color: '#0042DA' },
hiddenVariables: {
'Current URL': window.location.href,
'User ID': user?.id,
Name: user?.name ?? undefined,
Email: user?.email ?? undefined,
'Typebot ID': typebot?.id,
},
})
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [router])
}, [user, typebot])

return <></>
}

2 comments on commit 341cd15

@vercel
Copy link

@vercel vercel bot commented on 341cd15 Feb 19, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

builder-v2 – ./apps/builder

builder-v2-typebot-io.vercel.app
builder-v2-git-main-typebot-io.vercel.app
app.typebot.io

@vercel
Copy link

@vercel vercel bot commented on 341cd15 Feb 19, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.