|
|
@@ -79,7 +79,7 @@ function DashboardContent() {
|
|
|
|
|
|
const [open, setOpen] = React.useState(false);
|
|
|
|
|
|
- const isMovil = Size('(min-width:770px)');
|
|
|
+ const isMovil = Size('(max-width:770px)');
|
|
|
const auth = useAuth();
|
|
|
const navigate = useNavigate()
|
|
|
|
|
|
@@ -90,23 +90,16 @@ function DashboardContent() {
|
|
|
|
|
|
const [anchorEl, setAnchorEl] = React.useState(null);
|
|
|
const open_profile = Boolean(anchorEl);
|
|
|
- const handleClick = (event) => {
|
|
|
- console.log('handle click')
|
|
|
- console.log(event)
|
|
|
- setAnchorEl(event.currentTarget);
|
|
|
- }
|
|
|
+ const handleClick = (event) => setAnchorEl(event.currentTarget);
|
|
|
const handleClose = () => setAnchorEl(null)
|
|
|
-
|
|
|
const toggleDrawer = () => {
|
|
|
- setOpen(!open);
|
|
|
+ if(isMovil){
|
|
|
+ setAnchorElMov(!anchorElMovil)
|
|
|
+ }else{
|
|
|
+ setOpen(!open);
|
|
|
+ }
|
|
|
}
|
|
|
-
|
|
|
const [anchorElMovil, setAnchorElMov] = React.useState(false);
|
|
|
- const MenuResponsive = () => {
|
|
|
- console.log(anchorElMovil)
|
|
|
- setAnchorElMov(!anchorElMovil);
|
|
|
- }
|
|
|
-
|
|
|
|
|
|
return (
|
|
|
<ThemeProvider theme={mdTheme}>
|
|
|
@@ -117,9 +110,11 @@ function DashboardContent() {
|
|
|
<AppBar style={{ backgroundColor: '#fff', boxShadow: 'None' }} position="absolute" open={open}>
|
|
|
<Toolbar sx={{ pr: '24px', borderBottom: "1px solid #ec5e69" }} >
|
|
|
<IconButton
|
|
|
+ name="navigation_icon_button"
|
|
|
edge="start"
|
|
|
color="inherit"
|
|
|
aria-label="open drawer"
|
|
|
+ // onClick={isMovil ? MenuResponsive : toggleDrawer}
|
|
|
onClick={toggleDrawer}
|
|
|
sx={{ marginRight: '36px', ...( open && { display: 'none' }), }} >
|
|
|
<MenuIcon style={{
|