Skip to content

Commit

Permalink
[#123] feat: Delete signup console.log code
Browse files Browse the repository at this point in the history
  • Loading branch information
rosieyeon committed Feb 17, 2022
1 parent 01c621b commit 489b4ae
Show file tree
Hide file tree
Showing 7 changed files with 123 additions and 36 deletions.
47 changes: 17 additions & 30 deletions src/components/signup.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ function SignUp() {
const onSubmit = useCallback(
(event) => {
// event.preventDefault();
console.log(email, nickname, password);
setSignupSuccess(false);
axios
.post(
Expand All @@ -62,7 +61,6 @@ function SignUp() {
)
.then((res) => {
if (res.data.statusCode === 200) {
console.log(res);
setSignupSuccess(true);
} else {
setSignupSuccess(false);
Expand Down Expand Up @@ -90,44 +88,34 @@ function SignUp() {
}, []);

// 이메일 인증 검사(메일 발송)
const onClickEmail = useCallback(
(event) => {
// event.preventDefault();
console.log(email);
axios
.post(process.env.REACT_APP_SERVER_URL + "/emails", {
email: email,
})
.then((res) => {
if (res.data.statusCode === 200) {
console.log(res.data);
setEmailExist(false);
} else {
setEmailExist(true);
setEmailAuthMsg("이미 가입된 이메일입니다");
}
})
.catch((err) => {
console.log(err);
console.log("hi");
const onClickEmail = useCallback(() => {
axios
.post(process.env.REACT_APP_SERVER_URL + "/emails", {
email: email,
})
.then((res) => {
if (res.data.statusCode === 200) {
setEmailExist(false);
} else {
setEmailExist(true);
setEmailAuthMsg("이미 가입된 이메일입니다");
});
},
[email]
);
}
})
.catch((err) => {
setEmailExist(true);
setEmailAuthMsg("이미 가입된 이메일입니다");
});
}, [email]);

// 이메일 인증 코드 검증
const onClickAuthEmail = useCallback(
(event) => {
console.log(emailAuth);
axios
.post(process.env.REACT_APP_SERVER_URL + "/emails/auth", {
email: email,
authCode: emailAuth,
})
.then((res) => {
console.log(res);
if (res.data.statusCode === 200) {
setIsEmailAuth(true);
setEmailMessage("이메일 인증이 완료되었습니다");
Expand Down Expand Up @@ -159,15 +147,14 @@ function SignUp() {
nickname: nicknameCurrent,
})
.then((res) => {
console.log(res);
// console.log(res);
if (res.data.statusCode === 200) {
checkExNickname(true);
setExNicknameMsg("사용 가능한 닉네임입니다");
setNicknameMessage("");
setIsNickname(true);
} else {
checkExNickname(false);
console.log("hi");
setExNicknameMsg("이미 사용중인 닉네임입니다");
setIsNickname(false);
}
Expand Down
29 changes: 27 additions & 2 deletions src/statics/css/modal.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/statics/css/modal.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions src/statics/css/signup.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/statics/css/signup.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 26 additions & 2 deletions src/statics/scss/modal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
padding: 5px 16px 40px 16px;
text-align: center;
.body-heading1 {
font-size: 20px;
font-size: 18px;
line-height: 19px;
color: #434343;
margin-bottom: 10px;
Expand Down Expand Up @@ -85,6 +85,7 @@
color: white;
margin-left: 6px;
margin-bottom: 1.5px;
font-size: 12px;
}
.btn-m {
cursor: pointer;
Expand All @@ -95,7 +96,7 @@
width: 20%;
border: none;
background: #6667ab;
border-radius: 10px;
border-radius: 7px;
// margin: 20px;
}
}
Expand All @@ -117,3 +118,26 @@
align-items: center;
animation: modal-bg-show 0.3s;
}
.btn-xs {
cursor: pointer;
height: 32px;
width: 15%;
border: 1px solid $mainColor;
background-color: $mainColor;
border-radius: 5px;
color: white;
margin-left: 6px;
margin-bottom: 1.5px;
}
.btn-m {
cursor: pointer;
color: white;
font-size: 16px;
line-height: 17px;
height: 36px;
width: 20%;
border: none;
background: #6667ab;
border-radius: 7px;
// margin: 20px;
}
25 changes: 25 additions & 0 deletions src/statics/scss/signup.scss
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@
.content {
display: flex;
justify-content: center;
align-items: center;
padding-bottom: 25px;
img {
height: 20px;
Expand Down Expand Up @@ -276,3 +277,27 @@
}
}
}
.btn-xs {
cursor: pointer;
height: 32px;
width: 15%;
border: 1px solid $mainColor;
background-color: $mainColor;
border-radius: 5px;
color: white;
margin-left: 6px;
margin-bottom: 1.5px;
font-size: 12px;
}
.btn-m {
cursor: pointer;
color: white;
font-size: 16px;
line-height: 17px;
height: 36px;
width: 20%;
border: none;
background: #6667ab;
border-radius: 7px;
// margin: 20px;
}

0 comments on commit 489b4ae

Please sign in to comment.