feat : add alert check vpn on modal buy components

This commit is contained in:
ALi Josheghani
2024-10-04 17:06:42 +03:30
parent bd5eb126f9
commit 653d8fc124

View File

@@ -148,7 +148,7 @@ const ModalBuy = ({ isOpen, setIsOpen, configId }: ModalBuyProps) => {
) { ) {
errorMessage = (err.response.data as { alert: string }).alert; errorMessage = (err.response.data as { alert: string }).alert;
} }
toast.error(`خطایی رخ داد : ${errorMessage}`) toast.error(`خطایی رخ داد : ${errorMessage}`);
// dispatch(setIsPaymentGateway(false)); // dispatch(setIsPaymentGateway(false));
// navigate("/noactive-payment"); // navigate("/noactive-payment");
return errorMessage; return errorMessage;
@@ -207,6 +207,11 @@ const ModalBuy = ({ isOpen, setIsOpen, configId }: ModalBuyProps) => {
</div> </div>
) : ( ) : (
<div className="w-full h-full flex flex-col gap-3 justify-between items-center text-sm md:text-xl"> <div className="w-full h-full flex flex-col gap-3 justify-between items-center text-sm md:text-xl">
<Alert type="danger">
{" "}
کاربر گرامی لطفا از خاموش بودن vpn خود اطمینان حاصل فرمایید تا در
درگاه پرداخت مشکلی نداشته باشید{" "}
</Alert>
<h1 className="font-bold"> <h1 className="font-bold">
مبلغ قابل پرداخت :{" "} مبلغ قابل پرداخت :{" "}
<span className="px-[2px] rounded-md bg-secondTheme text-gray-950"> <span className="px-[2px] rounded-md bg-secondTheme text-gray-950">
@@ -217,7 +222,10 @@ const ModalBuy = ({ isOpen, setIsOpen, configId }: ModalBuyProps) => {
</h1> </h1>
{data?.data?.result?.max_config === 0 ? ( {data?.data?.result?.max_config === 0 ? (
<> <>
<Alert type="info" extra="mt-5"> موجودی کانفیگ به اتمام رسیده </Alert> <Alert type="info" extra="mt-5">
{" "}
موجودی کانفیگ به اتمام رسیده{" "}
</Alert>
</> </>
) : ( ) : (
<> <>