From dee65cf6a4078fcff675a9685d0e83d967846536 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=B5=D0=BD=D0=B8=D1=81=20=D0=9A=D0=B0=D1=82=D0=B0?= =?UTF-8?q?=D0=B5=D0=B2?= Date: Mon, 8 Jul 2024 16:45:43 +0000 Subject: [PATCH] Hotfix/fix trial duration --- src/components/PaymentModal/index.tsx | 2 +- src/components/pages/ABDesign/v1/pages/TrialChoice/index.tsx | 4 ++-- .../v1/pages/TrialPayment/components/PaymentTable/index.tsx | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/PaymentModal/index.tsx b/src/components/PaymentModal/index.tsx index fe120cd..f60246e 100644 --- a/src/components/PaymentModal/index.tsx +++ b/src/components/PaymentModal/index.tsx @@ -151,7 +151,7 @@ function PaymentModal({ You will be charged only{" "} ${getPrice(_activeProduct)} for your{" "} - {_activeProduct.trialDuration}-day trial. + {_activeProduct?.trialDuration}-day trial.

diff --git a/src/components/pages/ABDesign/v1/pages/TrialChoice/index.tsx b/src/components/pages/ABDesign/v1/pages/TrialChoice/index.tsx index 1ea4ce6..c217897 100644 --- a/src/components/pages/ABDesign/v1/pages/TrialChoice/index.tsx +++ b/src/components/pages/ABDesign/v1/pages/TrialChoice/index.tsx @@ -108,8 +108,8 @@ function TrialChoicePage() { replacement: { target: "${trialDuration}", replacement: - activeProduct?.trialDuration.toString() || - products[0].trialDuration.toString() || + activeProduct?.trialDuration?.toString() || + products[0]?.trialDuration?.toString() || "3", }, })} diff --git a/src/components/pages/ABDesign/v1/pages/TrialPayment/components/PaymentTable/index.tsx b/src/components/pages/ABDesign/v1/pages/TrialPayment/components/PaymentTable/index.tsx index 8859b89..a51242d 100644 --- a/src/components/pages/ABDesign/v1/pages/TrialPayment/components/PaymentTable/index.tsx +++ b/src/components/pages/ABDesign/v1/pages/TrialPayment/components/PaymentTable/index.tsx @@ -87,7 +87,7 @@ function PaymentTable({

You are enrolling in 2 weeks subscription. By continuing you agree that - if you don't cancel prior to the end of the {product.trialDuration}-day + if you don't cancel prior to the end of the {product?.trialDuration}-day trial for the ${getPrice(product)} you will automatically be charged $ {product.price / 100}{" "} every 2 weeks until you cancel in settings. Learn more about