From ce8780669175823ea8388627d569e5ce8b06a197 Mon Sep 17 00:00:00 2001 From: Hyoeunkh Date: Fri, 5 Jul 2024 00:24:21 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=ED=8A=B9=EC=A0=95=20=ED=8E=98=EC=9D=B4?= =?UTF-8?q?=EC=A7=80=EC=97=90=EC=84=9C=20=EB=A1=9C=EA=B7=B8=EC=9D=B8=20?= =?UTF-8?q?=EC=97=AC=EB=B6=80=20=ED=8C=90=EB=8B=A8=ED=95=98=EB=8A=94=20?= =?UTF-8?q?=EA=B8=B0=EB=8A=A5=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/RequiredLogin.tsx | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/utils/RequiredLogin.tsx diff --git a/src/utils/RequiredLogin.tsx b/src/utils/RequiredLogin.tsx new file mode 100644 index 000000000..c30eb5e20 --- /dev/null +++ b/src/utils/RequiredLogin.tsx @@ -0,0 +1,11 @@ +import { Navigate, Outlet } from 'react-router-dom'; + +import { useAuth } from '@/hooks/useAuth'; + +export const RequiredLogin = () => { + const { authToken } = useAuth(); + if (!authToken) { + return ; + } + return ; +};