diff --git a/src/components/NavBar/index.tsx b/src/components/NavBar/index.tsx
index 41a4210..1afe766 100644
--- a/src/components/NavBar/index.tsx
+++ b/src/components/NavBar/index.tsx
@@ -18,13 +18,10 @@ import {
IconUser,
IconSettings,
IconPoweroff,
- IconExperiment,
- IconDashboard,
- IconInteraction,
- IconTag,
IconLoading,
} from '@arco-design/web-react/icon';
import { useSelector, useDispatch } from 'react-redux';
+import { useHistory } from 'react-router-dom';
import { GlobalState } from '@/store';
import { GlobalContext } from '@/context';
import useLocale from '@/utils/useLocale';
@@ -39,6 +36,7 @@ import { generatePermission } from '@/routes';
function Navbar({ show }: { show: boolean }) {
const t = useLocale();
+ const history = useHistory();
const { userInfo, userLoading } = useSelector((state: GlobalState) => state);
const dispatch = useDispatch();
@@ -55,8 +53,8 @@ function Navbar({ show }: { show: boolean }) {
function onMenuItemClick(key) {
if (key === 'logout') {
logout();
- } else {
- Message.info(`You clicked ${key}`);
+ } else if (key === 'userInfo') {
+ history.push('/user-info');
}
}
@@ -84,54 +82,12 @@ function Navbar({ show }: { show: boolean }) {
);
}
- const handleChangeRole = () => {
- const newRole = role === 'admin' ? 'user' : 'admin';
- setRole(newRole);
- };
-
const droplist = (