From a0a30037aee511211fc6c3571a62baa8313d80b1 Mon Sep 17 00:00:00 2001 From: lars Date: Thu, 12 Sep 2024 14:05:56 +0200 Subject: [PATCH] =?UTF-8?q?nur=20Plan=20ULTRA=20kann=20neue=20Workspaces?= =?UTF-8?q?=20zum=20Dashboard=20hinzuf=C3=BCgen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../workspace/components/WorkspaceDropdown.tsx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/apps/builder/src/features/workspace/components/WorkspaceDropdown.tsx b/apps/builder/src/features/workspace/components/WorkspaceDropdown.tsx index 9014abdd3..accce08a0 100644 --- a/apps/builder/src/features/workspace/components/WorkspaceDropdown.tsx +++ b/apps/builder/src/features/workspace/components/WorkspaceDropdown.tsx @@ -18,6 +18,8 @@ import { Text, } from '@chakra-ui/react' import { WorkspaceInApp } from '../WorkspaceProvider' +import { useWorkspace } from '@/features/workspace/WorkspaceProvider' //für die Planprüfung +import { Plan } from '@typebot.io/prisma' //für die Planprüfung type Props = { currentWorkspace?: WorkspaceInApp @@ -34,6 +36,7 @@ export const WorkspaceDropdown = ({ }: Props) => { const { t } = useTranslate() const { data } = trpc.workspace.listWorkspaces.useQuery() + const { workspace } = useWorkspace() //für die Planprüfung const workspaces = data?.workspaces ?? [] @@ -71,9 +74,11 @@ export const WorkspaceDropdown = ({ ))} - }> - {t('workspace.dropdown.newButton.label')} - + {workspace?.plan === Plan.UNLIMITED && ( //nur Plan ULTRA kann neue Workspaces zum Dashboard hinzufügen + }> + {t('workspace.dropdown.newButton.label')} + + )} }