Skip to content

Commit 6656d71

Browse files
committed
fix(FR-1777): Fix to import the appropriate t function in useWebUIMenuItems (#4800)
resolves #4799 (FR-1777) this pr fix to import the appropriate `t` function in `useWebUIMenuItems.ts` **Checklist:** (if applicable) - [ ] Documentation - [ ] Minium required manager version - [ ] Specific setting for review (eg., KB link, endpoint or how to setup) - [ ] Minimum requirements to check during review - [ ] Test case(s) to demonstrate the difference of before/after
1 parent 7026414 commit 6656d71

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

react/src/hooks/useWebUIMenuItems.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ import {
2727
BAISessionsIcon,
2828
filterOutEmpty,
2929
} from 'backend.ai-ui';
30-
import { t } from 'i18next';
3130
import _ from 'lodash';
3231
import {
3332
BotMessageSquare,
@@ -37,6 +36,7 @@ import {
3736
ExternalLinkIcon,
3837
} from 'lucide-react';
3938
import { ReactNode } from 'react';
39+
import { useTranslation } from 'react-i18next';
4040
import { useLocation } from 'react-router-dom';
4141
import WebUILink from 'src/components/WebUILink';
4242

@@ -101,6 +101,7 @@ export const useWebUIMenuItems = ({
101101
const plugins = useWebUIPluginValue();
102102

103103
const location = useLocation();
104+
const { t } = useTranslation();
104105
const baiClient = useSuspendedBackendaiClient();
105106
const isHideAgents = baiClient?._config?.hideAgents ?? true;
106107
const fasttrackEndpoint = baiClient?._config?.fasttrackEndpoint ?? null;

0 commit comments

Comments
 (0)