fix: Login with @tanstack/react-query #1306 (#1691)

### What problem does this PR solve?

fix: Login with @tanstack/react-query #1306

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
balibabu
2024-07-24 18:02:58 +08:00
committed by GitHub
parent 32d5885b68
commit 7ca98848ac
6 changed files with 85 additions and 125 deletions

View File

@@ -1,5 +1,8 @@
import { Domain } from '@/constants/common';
import { useTranslate } from '@/hooks/common-hooks';
import { useLogout } from '@/hooks/login-hooks';
import { useSecondPathName } from '@/hooks/route-hook';
import { useFetchSystemVersion } from '@/hooks/user-setting-hooks';
import type { MenuProps } from 'antd';
import { Flex, Menu } from 'antd';
import React, { useEffect, useMemo } from 'react';
@@ -9,9 +12,6 @@ import {
UserSettingIconMap,
UserSettingRouteKey,
} from '../constants';
import { useTranslate } from '@/hooks/common-hooks';
import { useFetchSystemVersion, useLogout } from '@/hooks/user-setting-hooks';
import styles from './index.less';
type MenuItem = Required<MenuProps>['items'][number];
@@ -19,7 +19,7 @@ type MenuItem = Required<MenuProps>['items'][number];
const SideBar = () => {
const navigate = useNavigate();
const pathName = useSecondPathName();
const logout = useLogout();
const { logout } = useLogout();
const { t } = useTranslate('setting');
const { version, fetchSystemVersion } = useFetchSystemVersion();