From 4df04cafd6ca71ed928e6998b27a5c063b50de9f Mon Sep 17 00:00:00 2001 From: Jerry Liang <8124783+nianiaJR@users.noreply.github.com> Date: Tue, 19 Mar 2024 15:28:21 +0800 Subject: [PATCH] chore: hide the llm import feature in cloud (#777) --- app/pages/Import/index.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/pages/Import/index.tsx b/app/pages/Import/index.tsx index 514ffaab..d1141b15 100644 --- a/app/pages/Import/index.tsx +++ b/app/pages/Import/index.tsx @@ -5,6 +5,7 @@ import { trackPageView } from '@app/utils/stat'; import cls from 'classnames'; import { useI18n } from '@vesoft-inc/i18n'; import llm from '@app/stores/llm'; +import { useStore } from '@app/stores'; import DatasourceList from './DatasourceList'; import styles from './index.module.less'; import TaskList from './TaskList'; @@ -14,9 +15,12 @@ const Import = () => { const location = useLocation(); const [tab, setTab] = useState('tasks'); const { intl } = useI18n(); + const { global: { platform }} = useStore(); useEffect(() => { trackPageView('/import'); - llm.fetchConfig(); + if (platform !== 'cloud') { + llm.fetchConfig(); + } }, []); useEffect(() => { const path = location.pathname;