Create a drawer component #11
This commit is contained in:
4 files changed
+619
-390
No files matched your search
@@ -27,6 +27,7 @@ import { MdiArrowLeft } from "../icons/mdiArrowLeft";
|
||||
import { MdiCog } from "../icons/mdiCog";
|
||||
import { MdiInformation } from "../icons/mdiInformation";
|
||||
import { MdiMenu } from "../icons/mdiMenu";
|
||||
import { useDrawerStore } from "../../utils/store/drawer";
|
||||
|
||||
export const AppBar = () => {
|
||||
const navigate = useNavigate();
|
||||
@@ -60,6 +61,12 @@ export const AppBar = () => {
|
||||
setAnchorEl(null);
|
||||
};
|
||||
|
||||
const [setDrawerOpen] = useDrawerStore((state) => [state.setOpen]);
|
||||
|
||||
const handleDrawerOpen = () => {
|
||||
setDrawerOpen(true);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
if (
|
||||
location.pathname.includes("login") ||
|
||||
@@ -110,7 +117,7 @@ export const AppBar = () => {
|
||||
<IconButton
|
||||
color="inherit"
|
||||
aria-label="open drawer"
|
||||
// onClick={handleDrawerOpen}
|
||||
onClick={handleDrawerOpen}
|
||||
>
|
||||
<MdiMenu />
|
||||
</IconButton>
|
||||
|
||||
Reference in new issue
Block a user