refactor: add settings menu in user menu
This commit is contained in:
parent
70f0f56b47
commit
00a045915e
@ -1,5 +1,5 @@
|
||||
import React, { useState } from 'react';
|
||||
import { Outlet, useSearchParams } from 'react-router-dom';
|
||||
import { Outlet, useNavigate, useSearchParams } from 'react-router-dom';
|
||||
import { NavItem } from '../components/NavItem';
|
||||
import { MobileNavItem } from '../components/MobileNavItem';
|
||||
import { UserOutlined } from '@ant-design/icons';
|
||||
@ -30,6 +30,7 @@ export const Layout: React.FC = React.memo(() => {
|
||||
const logout = useLogout();
|
||||
const isMobile = useIsMobile();
|
||||
const showHeader = !params.has('hideHeader');
|
||||
const navigate = useNavigate();
|
||||
|
||||
const accountEl = (
|
||||
<Dropdown
|
||||
@ -45,6 +46,13 @@ export const Layout: React.FC = React.memo(() => {
|
||||
disabled: w.current,
|
||||
})),
|
||||
},
|
||||
{
|
||||
key: 'settings',
|
||||
label: 'Settings',
|
||||
onClick: () => {
|
||||
navigate('/settings');
|
||||
},
|
||||
},
|
||||
{
|
||||
key: 'logout',
|
||||
label: 'Logout',
|
||||
|
Loading…
Reference in New Issue
Block a user