From bbf1fc88994aae2acff66eab7ab498f4b42d2f01 Mon Sep 17 00:00:00 2001 From: soheil khaledabadi Date: Tue, 22 Sep 2026 01:14:33 +0330 Subject: [PATCH] feat: render the connection-warning block from backend data per service MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replaces the hardcoded "⚠️ اتصال سرویس‌ها" text (shown for every product) with data.has_connection_notice / data.connection_notice from the config's own see() response, so it's opt-in per service instead of always-on for the whole category. Co-Authored-By: Claude Sonnet 5 --- .../section/productList/components/ModalBuy.tsx | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/pages/shop/section/productList/components/ModalBuy.tsx b/src/pages/shop/section/productList/components/ModalBuy.tsx index f3d0937..2b9550a 100644 --- a/src/pages/shop/section/productList/components/ModalBuy.tsx +++ b/src/pages/shop/section/productList/components/ModalBuy.tsx @@ -61,6 +61,10 @@ const ModalBuy = ({ isOpen, setIsOpen, configId }: ModalBuyProps) => { data?.data?.result?.has_extra_description ); const extraDescriptionSections = data?.data?.result?.extra_description ?? []; + const hasConnectionNotice = Boolean( + data?.data?.result?.has_connection_notice + ); + const connectionNotice = data?.data?.result?.connection_notice ?? ""; const advancedVerificationFromApi = data?.data?.result?.requires_advanced_verification; const hasAdvancedVerificationApiFlag = @@ -361,10 +365,12 @@ const ModalBuy = ({ isOpen, setIsOpen, configId }: ModalBuyProps) => { کاربر گرامی لطفا از خاموش بودن vpn خود اطمینان حاصل فرمایید تا در درگاه پرداخت مشکلی نداشته باشید{" "} -
-

⚠️ اتصال سرویس‌ها

-

با توجه به شرایط فعلی، هیچ تضمینی برای اتصال دائمی سرویس‌ها وجود ندارد. ممکن است اتصال مجدداً قطع شود یا حتی در برخی مواقع امکان برقراری آن فراهم نشود. با این حال، تمام تلاش خود را می‌کنیم تا هر چه سریع‌تر مشکل را برطرف کنیم. از همراهی و صبوری شما سپاسگزاریم.

-
+ {hasConnectionNotice && ( +
+

⚠️ اتصال سرویس

+

{connectionNotice}

+
+ )}

مبلغ قابل پرداخت :{" "}