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 }) { } catch ({ error, status }) {
toast.error(`${error?.response?.data?.message}`, { toast.error(`${error?.response?.data?.message}`, {
position: "bottom-right", position: "bottom-right",

View File

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