Fixed an issue where refreshing the login page caused the language settings to become invalid. #249 (#250)

### What problem does this PR solve?

Fixed an issue where refreshing the login page caused the language
settings to become invalid.

Issue link: #249

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
balibabu
2024-04-08 10:41:03 +08:00
committed by GitHub
parent c829799474
commit d0a1ffe6e2
8 changed files with 26 additions and 22 deletions

View File

@ -10,11 +10,7 @@ import { useEffect, useMemo } from 'react';
import { useTranslation } from 'react-i18next';
import { Link, Outlet, useDispatch, useLocation } from 'umi';
import Siderbar from './components/knowledge-sidebar';
import {
KnowledgeDatasetRouteKey,
KnowledgeRouteKey,
datasetRouteMap,
} from './constant';
import { KnowledgeDatasetRouteKey, KnowledgeRouteKey } from './constant';
import styles from './index.less';
const KnowledgeAdding = () => {
@ -55,7 +51,7 @@ const KnowledgeAdding = () => {
if (datasetActiveKey) {
items.push({
title: datasetRouteMap[datasetActiveKey],
title: t(`knowledgeDetails.${datasetActiveKey}`),
});
}