2
0

🛂 Disable direct support for Free users

Closes #1318
This commit is contained in:
Baptiste Arnaud
2024-03-04 17:57:32 +01:00
parent daaca9f817
commit 6d8a007f09
11 changed files with 98 additions and 5 deletions

View File

@@ -4,6 +4,7 @@ import { useWorkspace } from '@/features/workspace/WorkspaceProvider'
import React, { useEffect, useState } from 'react'
import { Bubble, BubbleProps } from '@typebot.io/nextjs'
import { planToReadable } from '@/features/billing/helpers/planToReadable'
import { Plan } from '@typebot.io/prisma'
export const SupportBubble = (props: Omit<BubbleProps, 'typebot'>) => {
const { typebot } = useTypebot()
@@ -18,6 +19,8 @@ export const SupportBubble = (props: Omit<BubbleProps, 'typebot'>) => {
setLastViewedTypebotId(typebot?.id)
}, [lastViewedTypebotId, typebot?.id])
if (workspace?.plan && workspace.plan !== Plan.FREE) return null
return (
<Bubble
typebot="typebot-support"