From 75442a2abe2933709196859263ac2d76aa5878d2 Mon Sep 17 00:00:00 2001 From: Luxshan2000 Date: Thu, 12 Oct 2023 12:30:57 +0530 Subject: [PATCH] feedback added --- webapp/src/views/SignUp.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/webapp/src/views/SignUp.js b/webapp/src/views/SignUp.js index 506da93..ac2fada 100644 --- a/webapp/src/views/SignUp.js +++ b/webapp/src/views/SignUp.js @@ -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 }); @@ -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("")