CFE-6 Fixed any bugs
This commit is contained in:
@@ -10,7 +10,7 @@ import useRequest from "@/lib/app/hooks/useRequest";
|
||||
import useUser from "@/lib/app/hooks/useUser";
|
||||
import {useTranslations} from "next-intl";
|
||||
|
||||
const LoginExpertComponent = () =>{
|
||||
const LoginExpertComponent = () => {
|
||||
const t = useTranslations();
|
||||
const requestServer = useRequest()
|
||||
const {setToken} = useUser(); // pass token to set token
|
||||
@@ -24,7 +24,7 @@ const LoginExpertComponent = () =>{
|
||||
notification: {show: false}
|
||||
}
|
||||
}).then((response) => {
|
||||
setToken(response.data.token)
|
||||
setToken(response.data.data.token)
|
||||
}).catch(() => {
|
||||
props.setSubmitting(false)
|
||||
})
|
||||
@@ -38,7 +38,7 @@ const LoginExpertComponent = () =>{
|
||||
password: Yup.string().required(t("LoginPage.password_error_message_required")),
|
||||
});
|
||||
|
||||
return(
|
||||
return (
|
||||
<Container maxWidth="sm">
|
||||
<Paper elevation={0}>
|
||||
<Formik
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
const BASE_URL = process.env.NEXT_PUBLIC_BASE_URL;
|
||||
|
||||
//login
|
||||
export const GET_USER_TOKEN = BASE_URL + "/dashboard/login";
|
||||
export const GET_USER_TOKEN = BASE_URL + "/api/auth/login";
|
||||
//end login
|
||||
|
||||
//change password
|
||||
@@ -9,5 +9,5 @@ export const SET_USER_PASSWORD = BASE_URL + "/dashboard/profile/change_password"
|
||||
//end change password
|
||||
|
||||
//user data
|
||||
export const GET_USER_ROUTE = BASE_URL + "/dashboard/profile/info";
|
||||
export const GET_USER_ROUTE = BASE_URL + "/api/profile/info";
|
||||
//user data
|
||||
Reference in New Issue
Block a user