-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
로그인/회원가입 구현 #4
base: develop
Are you sure you want to change the base?
로그인/회원가입 구현 #4
Conversation
실행은 다 되지만 로그인을 하면 가입한 계정도 204에러가 뜨면서 alert창이 띄워짐... 이걸 수정하면 또 가입하지 않은 계정도 모두 통과가 되면서 /home 페이지로 이동됨..
[생성]
backend/server.js
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
사용하지 않는 파일 삭제
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
backend/package.json
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
사용하지 않는 파일 삭제
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
삭제했습니다!
src/index.js
Outdated
|
||
const root = ReactDOM.createRoot(document.getElementById('root')); | ||
root.render( | ||
<React.StrictMode> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
해당 태그 사용 안 함.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
삭제했습니다!
src/index.js
Outdated
// If you want to start measuring performance in your app, pass a function | ||
// to log results (for example: reportWebVitals(console.log)) | ||
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals | ||
reportWebVitals(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
사용 안 함 삭제
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
삭제했습니당!
src/pages/page-login/Login.js
Outdated
e.preventDefault(); | ||
seterrors(Vaildation(values)); | ||
if (errors.email === "" && errors.password === "") { | ||
axios.post('http://localhost:8081/login', values) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Server Host 이상함.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/pages/page-login/Login.js
Outdated
<div className='d-flex justify-content-center align-items-center bg-primary vh-100'> | ||
<div className='bg-white p-3 rounded w-25'> | ||
<h2>Login</h2> | ||
<form action='' onSubmit={handleSubmit}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
form Tag 사용 X
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
form 태그 사용 대신 button 태그에 onclick 기능을 넣어주었습니다!
src/pages/page-register/Signup.js
Outdated
<div className='d-flex justify-content-center align-items-center bg-primary vh-100'> | ||
<div className='bg-white p-3 rounded w-25'> | ||
<h2>Sign-up</h2> | ||
<form action='' onSubmit={handleSubmit}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
form Tag 사용 X
post 했을때 200이 떴지만 400에러가 뜨면서 사용자를 찾을 수 없다고 에러가 발생
[생성]
src > page들
[오류]
회원가입이 가능해서 오류가 안나고 db에 잘 생성된다.
로그인으로 와서 가입한 회원으로 로그인을 하면 204에러가 뜨게 된다.
[사용 로직]
javascript. phpmyadmin(xampp) - mysql
테이블 : Signup > login