暂存,修改navigate和添加图片
This commit is contained in:
@@ -16,14 +16,14 @@ import {
|
||||
SwitcherOutlined,
|
||||
UserOutlined,
|
||||
} from '@ant-design/icons';
|
||||
import { useNavigate } from 'react-router';
|
||||
import { useMemo } from 'react';
|
||||
import { query } from '../query';
|
||||
import { useNewNavigate } from '../navicate';
|
||||
const meun = [
|
||||
{
|
||||
title: 'Your profile',
|
||||
icon: <HomeOutlined />,
|
||||
link: '/map',
|
||||
link: '/user/profile',
|
||||
},
|
||||
{
|
||||
title: 'Your orgs',
|
||||
@@ -45,7 +45,7 @@ export const LayoutUser = () => {
|
||||
switchOrg: state.switchOrg,
|
||||
})),
|
||||
);
|
||||
const navigate = useNavigate();
|
||||
const navigate = useNewNavigate();
|
||||
const items = useMemo(() => {
|
||||
const orgs = store.me?.orgs || [];
|
||||
return orgs.map((item) => {
|
||||
@@ -91,6 +91,7 @@ export const LayoutUser = () => {
|
||||
onClick={() => {
|
||||
if (item.link) {
|
||||
navigate(item.link);
|
||||
setOpen(false);
|
||||
} else {
|
||||
message.info('Coming soon');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user