From 0fbcfde81e4da182aa231786901e5713e53bbefb Mon Sep 17 00:00:00 2001 From: DOBOB_LAPTOP Date: Wed, 15 Nov 2023 10:34:24 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20=ED=95=A8=EC=88=98=20=EB=84=A4?= =?UTF-8?q?=EC=9D=B4=EB=B0=8D=20=EA=B0=9C=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/pages/AuthPage.tsx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/frontend/src/pages/AuthPage.tsx b/frontend/src/pages/AuthPage.tsx index 71cdea3e..1e6e47c8 100644 --- a/frontend/src/pages/AuthPage.tsx +++ b/frontend/src/pages/AuthPage.tsx @@ -13,10 +13,7 @@ const AuthPage = () => { const { login } = useAuthContext(); const navigate = useNavigate(); - // TODO: 함수 네이밍을 변경해야 합니다. - // 제안: 'code' param 여부 + 분기는 함수 외부로 빼는게 어떤가요? - // 분리한다면 함수 네이밍도 쉬워질 것 같아요. - const getAccessToken1 = async () => { + const authLogin = async () => { const code = searchParams.get('code'); if (!code) { @@ -34,7 +31,7 @@ const AuthPage = () => { }; useEffect(() => { - getAccessToken1(); + authLogin(); }, []); return ;