From 30f42c9bab59993e192b38234d8fda4fa666bbf6 Mon Sep 17 00:00:00 2001 From: kimkimjunjun Date: Mon, 30 Sep 2024 22:54:28 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20window=20=EC=97=90=EB=9F=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/post/page.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/app/post/page.tsx b/src/app/post/page.tsx index 8e027280..8c0b56be 100644 --- a/src/app/post/page.tsx +++ b/src/app/post/page.tsx @@ -65,6 +65,11 @@ function PostWrite() { const [result1, setResult1] = useState(null); const [transportStr, setTransportStr] = useState(''); const accessToken = Cookies.get("accessToken"); + const [isClient, setIsClient] = useState(false); + + useEffect(() => { + setIsClient(true); + }, []); useEffect(() => { setIsImageIdx([ @@ -430,7 +435,7 @@ function PostWrite() { > - {window.innerWidth > 600 ? ( + {isClient && window.innerWidth > 600 ? (