From 83022a27b411751149ebef18c8f50e0eda31e4df Mon Sep 17 00:00:00 2001 From: Charles Zhao Date: Thu, 17 Aug 2023 03:52:05 -0500 Subject: [PATCH] fix(console): remove pro tag from m2m app creation form in oss version (#4366) * refactor(console): improve app create form subtitle per selected framework * fix(console): remove pro tag from m2m app creation form in oss version --- .../src/pages/Applications/components/CreateForm/index.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/console/src/pages/Applications/components/CreateForm/index.tsx b/packages/console/src/pages/Applications/components/CreateForm/index.tsx index feeb794a0..f7f23abb4 100644 --- a/packages/console/src/pages/Applications/components/CreateForm/index.tsx +++ b/packages/console/src/pages/Applications/components/CreateForm/index.tsx @@ -6,6 +6,7 @@ import { useController, useForm } from 'react-hook-form'; import { useTranslation } from 'react-i18next'; import Modal from 'react-modal'; +import { isCloud } from '@/consts/env'; import { TenantsContext } from '@/contexts/TenantsProvider'; import DynamicT from '@/ds-components/DynamicT'; import FormField from '@/ds-components/FormField'; @@ -39,7 +40,7 @@ type Props = { function CreateForm({ defaultCreateType, defaultCreateFrameworkName, onClose }: Props) { const { currentTenantId } = useContext(TenantsContext); const { data: currentPlan } = useSubscriptionPlan(currentTenantId); - const isMachineToMachineDisabled = !currentPlan?.quota.machineToMachineLimit; + const isMachineToMachineDisabled = isCloud && !currentPlan?.quota.machineToMachineLimit; const { updateConfigs } = useConfigs(); const { handleSubmit,