From 55906c8375fd06d74ef1620b37b798f269354e9a Mon Sep 17 00:00:00 2001 From: twwu Date: Fri, 13 Jun 2025 18:01:01 +0800 Subject: [PATCH] fix: remove unused billing plan logic from CreateFromDSLModal component --- .../create-from-dsl-modal/index.tsx | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/web/app/components/datasets/create-from-pipeline/create-options/create-from-dsl-modal/index.tsx b/web/app/components/datasets/create-from-pipeline/create-options/create-from-dsl-modal/index.tsx index 5f6b2b077f..75ffe49feb 100644 --- a/web/app/components/datasets/create-from-pipeline/create-options/create-from-dsl-modal/index.tsx +++ b/web/app/components/datasets/create-from-pipeline/create-options/create-from-dsl-modal/index.tsx @@ -12,8 +12,6 @@ import { DSLImportMode, DSLImportStatus, } from '@/models/app' -import { useProviderContextSelector } from '@/context/provider-context' -import AppsFull from '@/app/components/billing/apps-full-in-dialog' import { usePluginDependencies } from '@/app/components/workflow/plugin-dependency/hooks' import { noop } from 'lodash-es' import Uploader from './uploader' @@ -70,9 +68,10 @@ const CreateFromDSLModal = ({ setFileContent('') } - const plan = useProviderContextSelector(state => state.plan) - const enableBilling = useProviderContextSelector(state => state.enableBilling) - const isAppsFull = (enableBilling && plan.usage.buildApps >= plan.total.buildApps) + // todo: TBD billing plan + // const plan = useProviderContextSelector(state => state.plan) + // const enableBilling = useProviderContextSelector(state => state.enableBilling) + // const isAppsFull = (enableBilling && plan.usage.buildApps >= plan.total.buildApps) const isCreatingRef = useRef(false) @@ -182,14 +181,12 @@ const CreateFromDSLModal = ({ } const buttonDisabled = useMemo(() => { - if (isAppsFull) - return true if (currentTab === CreateFromDSLModalTab.FROM_FILE) return !currentFile if (currentTab === CreateFromDSLModalTab.FROM_URL) return !dslUrlValue return false - }, [isAppsFull, currentTab, currentFile, dslUrlValue]) + }, [currentTab, currentFile, dslUrlValue]) return ( <> @@ -226,11 +223,6 @@ const CreateFromDSLModal = ({ ) } - {isAppsFull && ( -
- -
- )}