From fea639ed999a305a6a69ba1140ad654741e52558 Mon Sep 17 00:00:00 2001 From: si14444 Date: Mon, 22 Jan 2024 21:59:07 +0900 Subject: [PATCH] =?UTF-8?q?FIX:=20=EB=9D=BC=EC=9A=B0=ED=8C=85=20=EC=98=A4?= =?UTF-8?q?=EB=A5=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/layouts/onlyNotUser.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/layouts/onlyNotUser.tsx b/components/layouts/onlyNotUser.tsx index 822040e..1b8569e 100644 --- a/components/layouts/onlyNotUser.tsx +++ b/components/layouts/onlyNotUser.tsx @@ -8,9 +8,9 @@ export default function OnlyNotUser({ children }: { children: React.ReactNode }) const { showAlert } = useAlert(); const router = useRouter(); useEffect(() => { - if (!isError) { + if (user) { router.replace('/'); } - }, [isError, showAlert, router]); + }, [user, showAlert, router]); return children; }