fix: after logging out and entering the knowledge base page again, the data before still exists #1306 (#1597)

### What problem does this PR solve?

fix: after logging out and entering the knowledge base page again, the
data before still exists #1306
### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
balibabu
2024-07-19 09:07:36 +08:00
committed by GitHub
parent cf4fff64f8
commit fb21efd77d
13 changed files with 175 additions and 138 deletions

View File

@ -1,12 +1,10 @@
import i18n from '@/locales/config';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import { ReactQueryDevtools } from '@tanstack/react-query-devtools';
import { App, ConfigProvider, ConfigProviderProps } from 'antd';
import enUS from 'antd/locale/en_US';
import zhCN from 'antd/locale/zh_CN';
import zh_HK from 'antd/locale/zh_HK';
import React, { ReactNode, useEffect, useState } from 'react';
import storage from './utils/authorizationUtil';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import dayjs from 'dayjs';
import advancedFormat from 'dayjs/plugin/advancedFormat';
import customParseFormat from 'dayjs/plugin/customParseFormat';
@ -14,6 +12,8 @@ import localeData from 'dayjs/plugin/localeData';
import weekOfYear from 'dayjs/plugin/weekOfYear';
import weekYear from 'dayjs/plugin/weekYear';
import weekday from 'dayjs/plugin/weekday';
import React, { ReactNode, useEffect, useState } from 'react';
import storage from './utils/authorizationUtil';
dayjs.extend(customParseFormat);
dayjs.extend(advancedFormat);
@ -63,6 +63,7 @@ const RootProvider = ({ children }: React.PropsWithChildren) => {
>
<App> {children}</App>
</ConfigProvider>
<ReactQueryDevtools buttonPosition={'top-left'} />
</QueryClientProvider>
);
};