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