Skip to content

Commit

Permalink
Merge pull request #120 from Gamegoo-repo/fix/#119
Browse files Browse the repository at this point in the history
[Fix] 회원가입 중복 오류 수정
  • Loading branch information
yyypearl authored Oct 14, 2024
2 parents 62239db + d538287 commit 979bb6e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
8 changes: 7 additions & 1 deletion src/app/join/summoner/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ const Summoner = () => {
const [name, setName] = useState("");
const [tag, setTag] = useState("");

const [isLoading, setIsLoading] = useState(false);

const isAgree = useSelector((state: RootState) => state.signIn.terms[2]);
const email = useSelector((state: RootState) => state.signIn.email);
const password = useSelector((state: RootState) => state.signIn.password);
Expand Down Expand Up @@ -73,6 +75,7 @@ const Summoner = () => {
}

if (isCheckRiot) {
setIsLoading(true);
try {
await joinMember({
isAgree,
Expand All @@ -91,6 +94,8 @@ const Summoner = () => {
} else {
setErrorMsg("회원가입에 실패했습니다. 다시 시도해주세요.");
}
} finally {
setIsLoading(false);
}
}
};
Expand Down Expand Up @@ -129,8 +134,9 @@ const Summoner = () => {
{isCheckRiot ? (
<Button
buttonType="primary"
text="회원가입 완료"
text={isLoading ? "가입 중..." : "회원가입 완료"}
onClick={handleSendJoin}
disabled={isLoading}
/>
) : (
<Button
Expand Down
10 changes: 9 additions & 1 deletion src/app/login/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,13 @@ import {
} from "@/redux/slices/userSlice";
import { connectSocket, socket } from "@/socket";
import { theme } from "@/styles/theme";
import { clearTokens, getAccessToken, setName, setProfileImg, setToken } from "@/utils/storage";
import {
clearTokens,
getAccessToken,
setName,
setProfileImg,
setToken,
} from "@/utils/storage";
import { AxiosError } from "axios";
import Image from "next/image";
import Link from "next/link";
Expand Down Expand Up @@ -136,6 +142,7 @@ const Login = () => {
setEmail(value);
validateEmail(value);
}}
errorMsg="정보 불일치"
placeholder="이메일 주소"
isValid={emailValid}
/>
Expand All @@ -146,6 +153,7 @@ const Login = () => {
setPassword(value);
validatePassword(value);
}}
errorMsg="정보 불일치"
placeholder="비밀번호"
isValid={passwordValid}
/>
Expand Down

0 comments on commit 979bb6e

Please sign in to comment.