From f08bd277667b6d557820ca07556632af77ad28e1 Mon Sep 17 00:00:00 2001 From: lydiacho Date: Wed, 31 Jul 2024 11:34:06 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20useEffect=EB=A1=9C=20=EA=B0=90=EC=8B=B8?= =?UTF-8?q?=EC=A3=BC=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.tsx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 5fcbe0b8..0c02a8ee 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -43,11 +43,13 @@ const router = createBrowserRouter([ ]); const App = () => { - const isMobile = /Mobi/i.test(window.navigator.userAgent); - if (isMobile) { - alert('PC로 지원해주세요.'); - window.location.href = 'https://makers.sopt.org/recruit'; - } + useEffect(() => { + const isMobile = /Mobi/i.test(window.navigator.userAgent); + if (isMobile) { + alert('PC로 지원해주세요.'); + window.location.href = 'https://makers.sopt.org/recruit'; + } + }, []); const sessionRef = useRef(null);