diff --git a/web/app/components/plugins/card/index.tsx b/web/app/components/plugins/card/index.tsx index ef0c146512..049d92536b 100644 --- a/web/app/components/plugins/card/index.tsx +++ b/web/app/components/plugins/card/index.tsx @@ -1,6 +1,5 @@ 'use client' import React from 'react' -import { useContext } from 'use-context-selector' import { RiVerifiedBadgeLine } from '@remixicon/react' import type { Plugin } from '../types' import Icon from '../card/base/card-icon' @@ -10,7 +9,7 @@ import OrgInfo from './base/org-info' import Description from './base/description' import Placeholder from './base/placeholder' import cn from '@/utils/classnames' -import I18n from '@/context/i18n' +import { useGetLanguage } from '@/context/i18n' type Props = { className?: string @@ -35,7 +34,7 @@ const Card = ({ isLoading = false, loadingFileName, }: Props) => { - const { locale } = useContext(I18n) + const locale = useGetLanguage() const { type, name, org, label, brief, icon } = payload diff --git a/web/app/components/tools/provider-list.tsx b/web/app/components/tools/provider-list.tsx index 6f8fbc76bf..8f222bb637 100644 --- a/web/app/components/tools/provider-list.tsx +++ b/web/app/components/tools/provider-list.tsx @@ -9,10 +9,7 @@ import { useTabSearchParams } from '@/hooks/use-tab-searchparams' import TabSliderNew from '@/app/components/base/tab-slider-new' import LabelFilter from '@/app/components/tools/labels/filter' import SearchInput from '@/app/components/base/search-input' -import { DotsGrid } from '@/app/components/base/icons/src/vender/line/general' -import { Colors } from '@/app/components/base/icons/src/vender/line/others' -import { Route } from '@/app/components/base/icons/src/vender/line/mapsAndTravel' -import CustomCreateCard from '@/app/components/tools/provider/custom-create-card' +// import CustomCreateCard from '@/app/components/tools/provider/custom-create-card' import ProviderDetail from '@/app/components/tools/provider/detail' import Empty from '@/app/components/tools/add-tool-modal/empty' import { fetchCollectionList } from '@/service/tools' @@ -31,9 +28,9 @@ const ProviderList = () => { defaultTab: 'builtin', }) const options = [ - { value: 'builtin', text: t('tools.type.builtIn'), icon: }, - { value: 'api', text: t('tools.type.custom'), icon: }, - { value: 'workflow', text: t('tools.type.workflow'), icon: }, + { value: 'builtin', text: t('tools.type.builtIn') }, + { value: 'api', text: t('tools.type.custom') }, + { value: 'workflow', text: t('tools.type.workflow') }, ] const [tagFilterValue, setTagFilterValue] = useState([]) const handleTagsChange = (value: string[]) => { @@ -100,7 +97,7 @@ const ProviderList = () => { 'relative grid content-start grid-cols-1 gap-4 px-12 pt-2 pb-4 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 grow shrink-0', currentProvider && 'pr-6 sm:grid-cols-1 md:grid-cols-2 lg:grid-cols-3', )}> - {activeTab === 'api' && } + {/* {activeTab === 'api' && } */} {filteredCollectionList.map(collection => (