Skip to content

Commit

Permalink
feedback added
Browse files Browse the repository at this point in the history
  • Loading branch information
Luxshan2000 committed Oct 12, 2023
1 parent c50db4e commit 75442a2
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions webapp/src/views/SignUp.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default function SignUp() {
axios.post('http://localhost:5000/api/auth/signup', {email:email, password:password, name:userName})
.then(response => {
// Handle the successful response here
console.log('Registration successful!', response.data);


navigate("/passwordverify", { replace: true });

Expand All @@ -48,10 +48,12 @@ export default function SignUp() {
})
.catch(error => {
// Handle any errors that occur during the request
console.log('Registration failed!');


console.log(email,password, userName)
if(error.response){
setFeedback( error.response.data.error)
}else{
setFeedback("Network Error!")
}

}).finally(()=>{
setUserName("")
setEmail("")
Expand Down

0 comments on commit 75442a2

Please sign in to comment.