fixed bug: if zoom out the browser, the components can't be clicked

This commit is contained in:
汪志鹏
2023-05-06 23:59:04 +08:00
parent aa0795c4ed
commit 9576555c90
+4 -5
View File
@@ -1,4 +1,3 @@
import { useEffect } from 'react'
import { useDispatch, useSelector } from 'react-redux' import { useDispatch, useSelector } from 'react-redux'
import { Outlet } from 'react-router-dom' import { Outlet } from 'react-router-dom'
@@ -69,10 +68,10 @@ const MainLayout = () => {
dispatch({ type: SET_MENU, opened: !leftDrawerOpened }) dispatch({ type: SET_MENU, opened: !leftDrawerOpened })
} }
useEffect(() => { //useEffect(() => {
dispatch({ type: SET_MENU, opened: !matchDownMd }) // dispatch({ type: SET_MENU, opened: !matchDownMd })
// eslint-disable-next-line react-hooks/exhaustive-deps // // eslint-disable-next-line react-hooks/exhaustive-deps
}, [matchDownMd]) //}, [matchDownMd])
return ( return (
<Box sx={{ display: 'flex' }}> <Box sx={{ display: 'flex' }}>