|
|
@@ -4,6 +4,7 @@ import { useState } from 'react'; |
|
|
|
// material-ui |
|
|
|
import { useTheme } from '@mui/material/styles'; |
|
|
|
import { List, ListItemButton, ListItemIcon, ListItemText } from '@mui/material'; |
|
|
|
import {useNavigate} from "react-router-dom"; |
|
|
|
|
|
|
|
// assets |
|
|
|
import { EditOutlined, ProfileOutlined, LogoutOutlined, UserOutlined, WalletOutlined } from '@ant-design/icons'; |
|
|
@@ -13,9 +14,14 @@ import { EditOutlined, ProfileOutlined, LogoutOutlined, UserOutlined, WalletOutl |
|
|
|
const ProfileTab = ({ handleLogout }) => { |
|
|
|
const theme = useTheme(); |
|
|
|
|
|
|
|
const navigate = useNavigate() |
|
|
|
|
|
|
|
const [selectedIndex, setSelectedIndex] = useState(0); |
|
|
|
const handleListItemClick = (event, index) => { |
|
|
|
setSelectedIndex(index); |
|
|
|
if(index==999){ |
|
|
|
navigate('/test/sendMail'); |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
return ( |
|
|
@@ -45,6 +51,18 @@ const ProfileTab = ({ handleLogout }) => { |
|
|
|
</ListItemIcon> |
|
|
|
<ListItemText primary="Billing" /> |
|
|
|
</ListItemButton> |
|
|
|
{ |
|
|
|
JSON.parse(localStorage.getItem('userData')).fullenName=="2fi"? |
|
|
|
<ListItemButton selected={selectedIndex === 4} onClick={(event) => handleListItemClick(event, 999)}> |
|
|
|
<ListItemIcon> |
|
|
|
<WalletOutlined /> |
|
|
|
</ListItemIcon> |
|
|
|
<ListItemText primary="TestMail" /> |
|
|
|
</ListItemButton> |
|
|
|
:<></> |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
<ListItemButton selected={selectedIndex === 2} onClick={handleLogout}> |
|
|
|
<ListItemIcon> |
|
|
|
<LogoutOutlined /> |
|
|
|