import React from "react"; import PropTypes from "prop-types"; import clsx from "clsx"; import { makeStyles, useTheme } from "@material-ui/core/styles"; import { Drawer, List, Divider, IconButton, ListItemIcon, ListItemText } from "@material-ui/core"; import ChevronLeftIcon from "@material-ui/icons/ChevronLeft"; import ChevronRightIcon from "@material-ui/icons/ChevronRight"; import ListItem from "@material-ui/core/ListItem"; import DeleteIcon from "@material-ui/icons/Delete"; import DnsIcon from "@material-ui/icons/Dns"; import SettingsIcon from "@material-ui/icons/Settings"; import DashboardIcon from "@material-ui/icons/Dashboard"; import { useHistory } from "react-router-dom"; import { useTranslation } from "react-i18next"; import styles from "./styles"; const useStyles = makeStyles(styles); const Sidebar = ({ open, handleDrawerClose }) => { const classes = useStyles(); const theme = useTheme(); const history = useHistory(); const { t } = useTranslation(); return (
{theme.direction === "rtl" ? ( ) : ( )}
history.push("/dashboard")} > history.push("/machines")} > history.push("/trash")}> history.push("/settings")} >
); }; Sidebar.propTypes = { open: PropTypes.bool.isRequired, handleDrawerClose: PropTypes.func.isRequired }; export default Sidebar;