浏览代码

fix effect

AykutSarac 3 年之前
父节点
当前提交
6ddf656ba0
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/containers/Home/index.tsx

+ 1 - 1
src/containers/Home/index.tsx

@@ -19,7 +19,7 @@ const Home: React.FC = () => {
   const { push } = useRouter();
   const [isMobile, setIsMobile] = React.useState(false);
 
-  React.useLayoutEffect(() => {
+  React.useEffect(() => {
     setIsMobile(window.screen.width <= 768);
   }, []);