From ca85b0afbe7987d9f6c0234db1bd747ecb7f4009 Mon Sep 17 00:00:00 2001 From: zxhlyh Date: Thu, 4 Jan 2024 11:10:20 +0800 Subject: [PATCH] fix: remove useless code (#1903) --- .../app/configuration/config-model/provider-name.tsx | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/web/app/components/app/configuration/config-model/provider-name.tsx b/web/app/components/app/configuration/config-model/provider-name.tsx index e9ab01d5fc..a9e713e8ad 100644 --- a/web/app/components/app/configuration/config-model/provider-name.tsx +++ b/web/app/components/app/configuration/config-model/provider-name.tsx @@ -1,23 +1,17 @@ 'use client' import type { FC } from 'react' import React from 'react' -import { useContext } from 'use-context-selector' -import I18n from '@/context/i18n' -import type { ProviderEnum } from '@/app/components/header/account-setting/model-page/declarations' -import ProviderConfig from '@/app/components/header/account-setting/model-page/configs' export type IProviderNameProps = { - provideName: ProviderEnum + provideName: string } const ProviderName: FC = ({ provideName, }) => { - const { locale } = useContext(I18n) - return ( - {ProviderConfig[provideName]?.selector?.name[locale]} + {provideName} ) }