Browse Source

update

master
cyril.tsui 1 year ago
parent
commit
fb882b8d7e
2 changed files with 23 additions and 21 deletions
  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 View File

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


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


// assets // assets
import avatar1 from 'assets/images/users/avatar-1.png'; 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 { handleLogoutFunction } from 'auth/index';
import {useNavigate} from "react-router-dom"; import {useNavigate} from "react-router-dom";
import {useDispatch} from "react-redux"; import {useDispatch} from "react-redux";
@@ -48,12 +50,12 @@ TabPanel.propTypes = {
value: PropTypes.any.isRequired 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 ||============================== // // ==============================|| HEADER CONTENT - PROFILE ||============================== //


@@ -82,11 +84,11 @@ const Profile = () => {
setOpen(false); 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'; const iconBackColorOpen = 'grey.300';


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


+ 4
- 4
src/layout/MainLayout/Header/index.js View File

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




Loading…
Cancel
Save