2
0

🚸 Only show onboarding modal on cloud manage version

Closes #173
This commit is contained in:
Baptiste Arnaud
2023-01-02 08:33:43 +01:00
parent b9d38935a6
commit 080353bffb
4 changed files with 5 additions and 3 deletions

View File

@ -15,7 +15,7 @@ export const SupportBubble = () => {
useEffect(() => {
if (
isCloudProdInstance() &&
isCloudProdInstance &&
(localTypebotId !== typebot?.id || localUserId !== user?.id)
) {
setLocalTypebotId(typebot?.id)

View File

@ -53,7 +53,7 @@ export const TypebotHeader = () => {
}
const handleHelpClick = () => {
isCloudProdInstance()
isCloudProdInstance
? getBubbleActions().open()
: window.open('https://docs.typebot.io', '_blank')
}

View File

@ -26,6 +26,7 @@ import { CreateFolderButton } from './CreateFolderButton'
import { ButtonSkeleton, FolderButton } from './FolderButton'
import { TypebotButton } from './TypebotButton'
import { TypebotCardOverlay } from './TypebotButtonOverlay'
import { isCloudProdInstance } from '@/utils/helpers'
type Props = { folder: DashboardFolder | null }
@ -162,6 +163,7 @@ export const FolderContent = ({ folder }: Props) => {
{typebots &&
!isTypebotLoading &&
user &&
isCloudProdInstance &&
folder === null &&
env('E2E_TEST') !== 'true' && (
<OnboardingModal totalTypebots={typebots.length} />

View File

@ -104,7 +104,7 @@ export const timeSince = (date: string) => {
return Math.floor(seconds) + 's'
}
export const isCloudProdInstance = () =>
export const isCloudProdInstance =
typeof window !== 'undefined' && window.location.hostname === 'app.typebot.io'
export const numberWithCommas = (x: number) =>