new fix zarinpal
parent
8391d4083e
commit
7beec70c11
|
@ -95,7 +95,7 @@ const CheckoutData = () => {
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
router.push(data?.paymentUrl);
|
// router.push(data?.paymentUrl);
|
||||||
} catch ({ error, status }) {
|
} catch ({ error, status }) {
|
||||||
toast.error(`${error?.response?.data?.message}`, {
|
toast.error(`${error?.response?.data?.message}`, {
|
||||||
position: "bottom-right",
|
position: "bottom-right",
|
||||||
|
|
|
@ -31,10 +31,10 @@ Chapar.interceptors.response.use(
|
||||||
// Do something with response error
|
// Do something with response error
|
||||||
// ;
|
// ;
|
||||||
|
|
||||||
if (error.response.status === 401) {
|
// if (error.response.status === 401) {
|
||||||
localStorage.removeItem("token");
|
// localStorage.removeItem("token");
|
||||||
window.location.href = "/login";
|
// window.location.href = "/login";
|
||||||
}
|
// }
|
||||||
|
|
||||||
return Promise.reject({ error, status: error?.response?.status });
|
return Promise.reject({ error, status: error?.response?.status });
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue