MSP-3105 add navigate in menu in LayoutComponent and add Route in Routers
This commit is contained in:
1 parent
f908f2c7eb
commit
58075955dc
2 files changed
+13
-2
No files matched your search
@@ -29,14 +29,13 @@ import './layout.scss'
|
||||
const { Content, Sider } = Layout
|
||||
|
||||
const LayoutComponent = () => {
|
||||
const navigate = useNavigate()
|
||||
|
||||
const [collapsed, setCollapsed] = useState<boolean>(false)
|
||||
const [selectedMenuKeys, setSelectedMenuKeys] = useState<MenuItemKeysType[]>([])
|
||||
const [openKeys, setOpenKeys] = useState<string[]>([])
|
||||
const dispatch = useAppDispatch()
|
||||
const { status } = useAppSelector((state) => state.profileReducer)
|
||||
const location = useLocation()
|
||||
const navigate = useNavigate()
|
||||
const { hasPermission } = useRole()
|
||||
const { theme } = useContext(ConfigProvider.ConfigContext)
|
||||
|
||||
@@ -103,6 +102,9 @@ const LayoutComponent = () => {
|
||||
|
||||
const handlerOnClickMenu = ({ key }: any): void => {
|
||||
switch (key) {
|
||||
case MenuItemKeysType.users:
|
||||
navigate(routePaths.users)
|
||||
break
|
||||
case MenuItemKeysType.appAccess:
|
||||
navigate(routePaths.appAccess)
|
||||
break
|
||||
|
||||
Reference in new issue
Block a user