浏览代码

update

master
cyril.tsui 1年前
父节点
当前提交
fb882b8d7e
共有 2 个文件被更改,包括 23 次插入21 次删除
  1. +19
    -17
      src/layout/MainLayout/Header/HeaderContent/Profile/index.js
  2. +4
    -4
      src/layout/MainLayout/Header/index.js

+ 19
- 17
src/layout/MainLayout/Header/HeaderContent/Profile/index.js 查看文件

@@ -14,20 +14,22 @@ import {
Paper,
Popper,
Stack,
Tab,
Tabs,
// Tab,
// Tabs,
Typography
} from '@mui/material';

// project import
import MainCard from 'components/MainCard';
import Transitions from 'components/@extended/Transitions';
import ProfileTab from './ProfileTab';
import SettingTab from './SettingTab';
// import ProfileTab from './ProfileTab';
// import SettingTab from './SettingTab';

// assets
import avatar1 from 'assets/images/users/avatar-1.png';
import { LogoutOutlined, SettingOutlined, UserOutlined } from '@ant-design/icons';
import { LogoutOutlined,
// SettingOutlined, UserOutlined
} from '@ant-design/icons';
import { handleLogoutFunction } from 'auth/index';
import {useNavigate} from "react-router-dom";
import {useDispatch} from "react-redux";
@@ -48,12 +50,12 @@ TabPanel.propTypes = {
value: PropTypes.any.isRequired
};

function a11yProps(index) {
return {
id: `profile-tab-${index}`,
'aria-controls': `profile-tabpanel-${index}`
};
}
// function a11yProps(index) {
// return {
// id: `profile-tab-${index}`,
// 'aria-controls': `profile-tabpanel-${index}`
// };
// }

// ==============================|| HEADER CONTENT - PROFILE ||============================== //

@@ -82,11 +84,11 @@ const Profile = () => {
setOpen(false);
};

const [value, setValue] = useState(0);
// const [value, setValue] = useState(0);

const handleChange = (event, newValue) => {
setValue(newValue);
};
// const handleChange = (event, newValue) => {
// setValue(newValue);
// };

const iconBackColorOpen = 'grey.300';

@@ -165,7 +167,7 @@ const Profile = () => {
</Grid>
</Grid>
</CardContent>
{open && (
{/* {open && (
<>
<Box sx={{ borderBottom: 1, borderColor: 'divider' }}>
<Tabs variant="fullWidth" value={value} onChange={handleChange} aria-label="profile tabs">
@@ -202,7 +204,7 @@ const Profile = () => {
<SettingTab />
</TabPanel>
</>
)}
)} */}
</MainCard>
</ClickAwayListener>
</Paper>


+ 4
- 4
src/layout/MainLayout/Header/index.js 查看文件

@@ -109,9 +109,9 @@ function Header(props) {
<li>
<Link className="emailTemplate" to='/emailTemplate'><Typography variant={"headerTitle1"} sx={{ ml: 0 }}>Email Template</Typography></Link>
</li>
<li>
{/* <li>
<Link className="logout" onClick={handleLogout}><Typography variant={"headerTitle1"} sx={{ ml: 2 }}>Logout</Typography></Link>
</li>
</li> */}
</div>
:
<div id="individualUserContent">
@@ -140,9 +140,9 @@ function Header(props) {
<></>
}
</li>
<li>
{/* <li>
<Link className="logout" onClick={handleLogout}><Typography variant={"headerTitle1"} sx={{ ml: 2 }}>登出</Typography></Link>
</li>
</li> */}
</div>
);



正在加载...
取消
保存