Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change icons and update logout functionality #477

Merged
merged 2 commits into from
Oct 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 11 additions & 15 deletions frontend/front/src/pages/Surveyor/nav/LeftDrawer.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
import * as React from "react";

import AccountCircleIcon from "@mui/icons-material/AccountCircle";
import LogoutIcon from "@mui/icons-material/Logout";
import MenuIcon from "@mui/icons-material/Menu";
import SpaceDashboardIcon from "@mui/icons-material/SpaceDashboard";
import Box from "@mui/material/Box";
import Button from "@mui/material/Button";
import Drawer from "@mui/material/Drawer";
import { Link } from "react-router-dom";
import List from "@mui/material/List";
import ListItem from "@mui/material/ListItem";
import ListItemButton from "@mui/material/ListItemButton";
import ListItemIcon from "@mui/material/ListItemIcon";
import ListItemText from "@mui/material/ListItemText";
import MailIcon from "@mui/icons-material/Mail";
import MenuIcon from "@mui/icons-material/Menu";
import { Link } from "react-router-dom";
import { useLogoutUserMutation } from "../../../api/apiSlice";

export default function TemporaryDrawer() {
const [state, setState] = React.useState({
Expand All @@ -19,6 +22,7 @@ export default function TemporaryDrawer() {
bottom: false,
right: false,
});
const [logout] = useLogoutUserMutation();

const toggleDrawer = (anchor, open) => (event) => {
setState({ ...state, [anchor]: open });
Expand All @@ -35,32 +39,24 @@ export default function TemporaryDrawer() {
<ListItem disablePadding>
<ListItemButton component={Link} to="dashboard">
<ListItemIcon>
<MailIcon />
<SpaceDashboardIcon />
</ListItemIcon>
<ListItemText primary={"DASHBOARD"} />
</ListItemButton>
</ListItem>
<ListItem disablePadding>
<ListItemButton component={Link} to="house">
<ListItemIcon>
<MailIcon />
</ListItemIcon>
<ListItemText primary={"HOUSE PROFILE"} />
</ListItemButton>
</ListItem>
<ListItem disablePadding>
<ListItemButton component={Link} to="account">
<ListItemIcon>
<MailIcon />
<AccountCircleIcon />
</ListItemIcon>
<ListItemText primary={"ACCOUNT"} />
</ListItemButton>
</ListItem>

<ListItem disablePadding>
<ListItemButton>
<ListItemButton onClick={logout}>
<ListItemIcon>
<MailIcon />
<LogoutIcon />
</ListItemIcon>
<ListItemText primary={"LOGOUT"} />
</ListItemButton>
Expand Down
Loading