diff --git a/web/app/components/plugins/plugin-detail-panel/endpoint-list.tsx b/web/app/components/plugins/plugin-detail-panel/endpoint-list.tsx index 59a457ecbd..b31b45c0c7 100644 --- a/web/app/components/plugins/plugin-detail-panel/endpoint-list.tsx +++ b/web/app/components/plugins/plugin-detail-panel/endpoint-list.tsx @@ -1,6 +1,6 @@ import React, { useMemo } from 'react' import { useTranslation } from 'react-i18next' -import { useContext } from 'use-context-selector' +import { useDocLink } from '@/context/i18n' import { useBoolean } from 'ahooks' import { RiAddLine, @@ -20,8 +20,6 @@ import { useInvalidateEndpointList, } from '@/service/use-endpoints' import type { PluginDetail } from '@/app/components/plugins/types' -import { LanguagesSupported } from '@/i18n/language' -import I18n from '@/context/i18n' import cn from '@/utils/classnames' type Props = { @@ -29,7 +27,7 @@ type Props = { } const EndpointList = ({ detail }: Props) => { const { t } = useTranslation() - const { locale } = useContext(I18n) + const docLink = useDocLink() const pluginUniqueID = detail.plugin_unique_identifier const declaration = detail.declaration.endpoint const showTopBorder = detail.declaration.tool @@ -79,7 +77,7 @@ const EndpointList = ({ detail }: Props) => {