CodeWithHarry / iNotebook-React

INotebook is a React Application for managing personal notes on the cloud
343 stars 193 forks source link

Can anyone share the code till video number - 72 bcoz signup is'nt working #23

Open anshdube10801 opened 2 years ago

codewithlaksh commented 2 years ago

Here's the code. Warning:- React Router Dom version is 6 https://github.com/codewithlaksh/ReactJS-iNotebook

zarkjunejo commented 2 years ago

Signup Code is ok But i also faced problem with signup when register new user cant go to home with page and was getting error.that was because of token .cuz we got auth token only when we use login .signup only gives us first token which get not approved by our app.so i simply navigate to login after signup.then login and no error occurred. if (json.success) { //save token of user localStorage.setItem('auth-token', json.authtoken) navigate('/login'); props.showAlert("SuccessFully Created Account", "success") } else { props.showAlert("Invalid Creadentails", "danger") }

this in SignUp.js