new fix zarinpal

master
mpn 2024-03-07 21:46:02 +03:30
parent 8391d4083e
commit 7beec70c11
2 changed files with 5 additions and 5 deletions

View File

@ -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",

View File

@ -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 });
}