Conversation
실행은 다 되지만 로그인을 하면 가입한 계정도 204에러가 뜨면서 alert창이 띄워짐... 이걸 수정하면 또 가입하지 않은 계정도 모두 통과가 되면서 /home 페이지로 이동됨..
[생성]
Contributor
Author
There was a problem hiding this comment.
|
|
||
| const root = ReactDOM.createRoot(document.getElementById('root')); | ||
| root.render( | ||
| <React.StrictMode> |
Comment on lines
+15
to
+18
| // 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(); |
| e.preventDefault(); | ||
| seterrors(Vaildation(values)); | ||
| if (errors.email === "" && errors.password === "") { | ||
| axios.post('http://localhost:8081/login', values) |
Contributor
Author
There was a problem hiding this comment.
| <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}> |
Contributor
Author
There was a problem hiding this comment.
form 태그 사용 대신 button 태그에 onclick 기능을 넣어주었습니다!
| <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}> |
post 했을때 200이 떴지만 400에러가 뜨면서 사용자를 찾을 수 없다고 에러가 발생
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[생성]
src > page들
[오류]
회원가입이 가능해서 오류가 안나고 db에 잘 생성된다.
로그인으로 와서 가입한 회원으로 로그인을 하면 204에러가 뜨게 된다.
[사용 로직]
javascript. phpmyadmin(xampp) - mysql
테이블 : Signup > login