Skip to content

Commit

Permalink
닉네임 체크 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
wpdbsx committed Sep 22, 2023
1 parent 0d72ade commit a6a1cb9
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/pages/auth/Register.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ const Register: React.FC = () => {
setNickName(e.target.value);
setIsNickNameCheck(false);
setNickNameChk(true);
setNickNameExistChk(false);
};

const handleBirthDateUpdate = (e: any) => {
Expand Down Expand Up @@ -170,13 +169,15 @@ const Register: React.FC = () => {
withCredentials: false,
}
);
console.log(result);
if (result.data !== "") {
setNickNameExistChk(true);
console.log("여기왓어?");
setNickNameExistChk(false);
} else {
setRegisterInfo((prev) => {
return { ...prev, usrNm: nickName };
});
setNickNameExistChk(false);
setNickNameExistChk(true);
}
setNickNameAlertExistChk(true);
setIsNickNameCheck(true);
Expand Down Expand Up @@ -279,6 +280,7 @@ const Register: React.FC = () => {
document.getElementById("email")?.focus();
} else if (!nickNameExistChk) {
//미완료
console.log(nickNameExistChk);
console.log("nickname");

document.getElementById("nickName")?.focus();
Expand Down Expand Up @@ -405,6 +407,7 @@ const Register: React.FC = () => {
isButtonDisable={isNickNameCheck}
inputBlur={() => {
if (registerInfo.usrNm !== nickName) {
setNickNameExistChk(false);
setRegisterInfo((prev) => {
return { ...prev, usrNm: "" };
});
Expand Down

0 comments on commit a6a1cb9

Please sign in to comment.