From b3077725255fc3f6c13f315c73149cdc156121cc Mon Sep 17 00:00:00 2001 From: haesol822 Date: Wed, 13 Nov 2024 12:49:51 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=ED=9A=8C=EC=9B=90=EA=B0=80=EC=9E=85=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/signup/signup_complete.tsx | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/pages/signup/signup_complete.tsx b/src/pages/signup/signup_complete.tsx index cfc08a4..b443272 100644 --- a/src/pages/signup/signup_complete.tsx +++ b/src/pages/signup/signup_complete.tsx @@ -20,14 +20,7 @@ export default function CompleteStep() { const club = useRecoilValue(clubState); const navigate = useNavigate(); - const handleClear = () => { - completeSignup(part, club); - localStorage.setItem("isLoggedIn", "false"); - localStorage.setItem("token", ""); - navigate("/login"); - }; - - const completeSignup = async (part: string, club: string) => { + const handleClear = async () => { const mentorData = { part: part, club: club, @@ -45,10 +38,13 @@ export default function CompleteStep() { console.log(response.data); } alert("회원가입이 완료되었습니다."); + localStorage.setItem("isLoggedIn", "false"); + localStorage.setItem("token", ""); + navigate("/login"); } catch (error) { console.error("회원가입 실패: ", error); alert("회원가입에 실패하셨습니다. 다시 처음부터 회원가입해주세요."); - // navigate("/login"); + navigate("/login"); } }; return (