This commit is contained in:
Malai Raja
2023-12-01 10:32:28 +05:30
parent b3371d3bc0
commit 2aab086a66
16 changed files with 152 additions and 52 deletions

View File

@@ -36,19 +36,19 @@ const ProfileTab = ({ handleLogout }) => {
<ListItemIcon>
<ProfileOutlined />
</ListItemIcon>
<ListItemText primary="Social Profile" />
<ListItemText primary="Account Settings" />
</ListItemButton>
<ListItemButton selected={selectedIndex === 4} onClick={(event) => handleListItemClick(event, 4)}>
{/* <ListItemButton selected={selectedIndex === 4} onClick={(event) => handleListItemClick(event, 4)}>
<ListItemIcon>
<WalletOutlined />
</ListItemIcon>
<ListItemText primary="Billing" />
</ListItemButton>
</ListItemButton> */}
<ListItemButton selected={selectedIndex === 2}
// onClick={handleLogout}
onClick={()=>{
navigate('/login')
}}
onClick={handleLogout}
// onClick={()=>{
// navigate('/login')
// }}
>
<ListItemIcon>
<LogoutOutlined />

View File

@@ -52,12 +52,20 @@ const Profile = () => {
// const { logout, user } = useAuth();
const handleLogout = async () => {
try {
await logout();
navigate(`/login`, {
state: {
from: ''
}
});
// await logout();
// navigate(`/login`, {
// state: {
// from: ''
// }
// });
localStorage.removeItem('firstname');
localStorage.removeItem('appuserid');
localStorage.removeItem('authname');
localStorage.removeItem('roleid');
navigate('/login')
} catch (err) {
console.error(err);
}
@@ -153,14 +161,20 @@ const Profile = () => {
{/* {user?.name} */}
</Typography>
<Typography variant="body2" color="textSecondary">
UI/UX Designer
{/* UI/UX Designer */}
user
</Typography>
</Stack>
</Stack>
</Grid>
<Grid item>
<Tooltip title="Logout">
<IconButton size="large" sx={{ color: 'text.primary' }} onClick={handleLogout}>
<IconButton size="large" sx={{ color: 'text.primary' }}
// onClick={handleLogout}>
onClick={()=>{
handleLogout()
}}>
<LogoutOutlined />
</IconButton>
</Tooltip>
@@ -182,7 +196,7 @@ const Profile = () => {
label="Profile"
{...a11yProps(0)}
/>
<Tab
{/* <Tab
sx={{
display: 'flex',
flexDirection: 'row',
@@ -193,7 +207,7 @@ const Profile = () => {
icon={<SettingOutlined style={{ marginBottom: 0, marginRight: '10px' }} />}
label="Setting"
{...a11yProps(1)}
/>
/> */}
</Tabs>
</Box>
<TabPanel value={value} index={0} dir={theme.direction}>

View File

@@ -29,7 +29,7 @@ const HeaderContent = () => {
{matchesXs && <Box sx={{ width: '100%', ml: 1 }} />}
<Notification />
<Message />
{/* <Message /> */}
{!matchesXs && <Profile />}
{matchesXs && <MobileSection />}
</Stack>