Browse Source

fix effect

AykutSarac 3 năm trước cách đây
mục cha
commit
6ddf656ba0
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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);
   }, []);