From 9576555c90af1ce7470e8d9a671cad2b55764900 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B1=AA=E5=BF=97=E9=B9=8F?= <13476859295@163.com> Date: Sat, 6 May 2023 23:59:04 +0800 Subject: [PATCH] fixed bug: if zoom out the browser, the components can't be clicked --- packages/ui/src/layout/MainLayout/index.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/ui/src/layout/MainLayout/index.js b/packages/ui/src/layout/MainLayout/index.js index 8c874474..019e728b 100644 --- a/packages/ui/src/layout/MainLayout/index.js +++ b/packages/ui/src/layout/MainLayout/index.js @@ -1,4 +1,3 @@ -import { useEffect } from 'react' import { useDispatch, useSelector } from 'react-redux' import { Outlet } from 'react-router-dom' @@ -69,10 +68,10 @@ const MainLayout = () => { dispatch({ type: SET_MENU, opened: !leftDrawerOpened }) } - useEffect(() => { - dispatch({ type: SET_MENU, opened: !matchDownMd }) - // eslint-disable-next-line react-hooks/exhaustive-deps - }, [matchDownMd]) + //useEffect(() => { + // dispatch({ type: SET_MENU, opened: !matchDownMd }) + // // eslint-disable-next-line react-hooks/exhaustive-deps + //}, [matchDownMd]) return (