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')} + + )} }