Skip to content

Commit

Permalink
Merge pull request #45 from Soongsil-CoffeeChat/fix/#43-회원가입-수정
Browse files Browse the repository at this point in the history
fix: 회원가입 수정
  • Loading branch information
haesol822 authored Nov 13, 2024
2 parents 6c0c51e + b307772 commit b34ecbb
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions src/pages/signup/signup_complete.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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 (
Expand Down

0 comments on commit b34ecbb

Please sign in to comment.