@@ -15,7 +15,7 @@ export const SupportBubble = () => {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (
|
if (
|
||||||
isCloudProdInstance() &&
|
isCloudProdInstance &&
|
||||||
(localTypebotId !== typebot?.id || localUserId !== user?.id)
|
(localTypebotId !== typebot?.id || localUserId !== user?.id)
|
||||||
) {
|
) {
|
||||||
setLocalTypebotId(typebot?.id)
|
setLocalTypebotId(typebot?.id)
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ export const TypebotHeader = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const handleHelpClick = () => {
|
const handleHelpClick = () => {
|
||||||
isCloudProdInstance()
|
isCloudProdInstance
|
||||||
? getBubbleActions().open()
|
? getBubbleActions().open()
|
||||||
: window.open('https://docs.typebot.io', '_blank')
|
: window.open('https://docs.typebot.io', '_blank')
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ import { CreateFolderButton } from './CreateFolderButton'
|
|||||||
import { ButtonSkeleton, FolderButton } from './FolderButton'
|
import { ButtonSkeleton, FolderButton } from './FolderButton'
|
||||||
import { TypebotButton } from './TypebotButton'
|
import { TypebotButton } from './TypebotButton'
|
||||||
import { TypebotCardOverlay } from './TypebotButtonOverlay'
|
import { TypebotCardOverlay } from './TypebotButtonOverlay'
|
||||||
|
import { isCloudProdInstance } from '@/utils/helpers'
|
||||||
|
|
||||||
type Props = { folder: DashboardFolder | null }
|
type Props = { folder: DashboardFolder | null }
|
||||||
|
|
||||||
@@ -162,6 +163,7 @@ export const FolderContent = ({ folder }: Props) => {
|
|||||||
{typebots &&
|
{typebots &&
|
||||||
!isTypebotLoading &&
|
!isTypebotLoading &&
|
||||||
user &&
|
user &&
|
||||||
|
isCloudProdInstance &&
|
||||||
folder === null &&
|
folder === null &&
|
||||||
env('E2E_TEST') !== 'true' && (
|
env('E2E_TEST') !== 'true' && (
|
||||||
<OnboardingModal totalTypebots={typebots.length} />
|
<OnboardingModal totalTypebots={typebots.length} />
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ export const timeSince = (date: string) => {
|
|||||||
return Math.floor(seconds) + 's'
|
return Math.floor(seconds) + 's'
|
||||||
}
|
}
|
||||||
|
|
||||||
export const isCloudProdInstance = () =>
|
export const isCloudProdInstance =
|
||||||
typeof window !== 'undefined' && window.location.hostname === 'app.typebot.io'
|
typeof window !== 'undefined' && window.location.hostname === 'app.typebot.io'
|
||||||
|
|
||||||
export const numberWithCommas = (x: number) =>
|
export const numberWithCommas = (x: number) =>
|
||||||
|
|||||||
Reference in New Issue
Block a user