Fix more conflicting dependencies
This commit is contained in:
parent
291395f8d3
commit
3ca903cf4f
11 changed files with 300 additions and 364 deletions
|
|
@ -4,7 +4,7 @@ import { useSelector } from "react-redux";
|
|||
import SecurityIcon from "@mui/icons-material/Security";
|
||||
import VoiceIcon from "@mui/icons-material/PhoneInTalk";
|
||||
import { Box } from "@mui/material";
|
||||
import { useTheme } from "@mui/material/styles";
|
||||
import { useTheme } from "@mui/styles";
|
||||
import useMediaQuery from "@mui/material/useMediaQuery";
|
||||
import { useTranslate, MenuItemLink } from "react-admin";
|
||||
import users from "../users";
|
||||
|
|
@ -25,12 +25,13 @@ export const Menu: FC = ({ onMenuClick, logout, dense = false }: any) => {
|
|||
});
|
||||
const translate = useTranslate();
|
||||
const theme = useTheme();
|
||||
// @ts-ignore
|
||||
const isXSmall = useMediaQuery(theme.breakpoints.down("xs"));
|
||||
const open = useSelector((state: any) => state.admin.ui.sidebarOpen);
|
||||
useSelector((state: any) => state.theme); // force rerender on theme change
|
||||
|
||||
const handleToggle = (menu: MenuName) => {
|
||||
setState((state) => ({ ...state, [menu]: !state[menu] }));
|
||||
setState((state: any) => ({ ...state, [menu]: !state[menu] }));
|
||||
};
|
||||
|
||||
return (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue