You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Don't forget to import the useAuth() to the JSX component const { login } = useAuth();
In nutshell, we register a new user, then we run our login function, we pass username and password and then reload the page. I have no idea if it is implemented in a correct way - but it works!
The text was updated successfully, but these errors were encountered:
Well, I don't know what he does behind the scene you won't get a list of customers once a user has been registered.
I've taken a screenshot to show the code in the lesson
The issue is simple as this one. When a user signs up as we don't save a token.
https://github.com/amigoscode/full-stack-professional/blob/react-upload/frontend/react/src/components/shared/CreateCustomerForm.jsx
If you look at his last release there is a function onSuccess
While typing the message I just unable to figure out the meaning of the snippet:
onSuccess(res.headers["authorization"]);
onSuccess is fetchCustomers() function which doesn't accept arguments. What's the meaning of the code I just don't know.
I did basically as following:
Don't forget to import the useAuth() to the JSX component
const { login } = useAuth();
In nutshell, we register a new user, then we run our login function, we pass username and password and then reload the page. I have no idea if it is implemented in a correct way - but it works!
The text was updated successfully, but these errors were encountered: