Lost Soul
KPCKevin Powell - Community
•Created by Lost Soul on 10/7/2024 in #front-end
API integration
hey guys i need help anyone that have a good understanding on api integration using axios for login functionality can you help me on it
the problem is
i have login component and it have the email and password validation done including the necessary things for the login api call i have created a function here is what function looks like :
https://gist.github.com/lost50U1/7caf97f84484ac631da1001efd724368
and when i check the devtools network tab the i am getting this response from the api backend {
"success": true,
"message": "You have logged in successfully.",
"accessToken": "eyJhbGciOiJIUzI",
"role": "supplier",
"id": "6703bda7"
}
but it is not redirecting me to my welcome page
other configurations of the project that might help:
useUser.ts hook https://gist.github.com/lost50U1/7bb72d153c0eb63ea6f5573e6cb16e4e
anyone that wants to help you can ask me anything about the project
7 replies