From 2c636d16ebd4d74f3ead22d49b280f03e97f64da Mon Sep 17 00:00:00 2001 From: Rishabh Date: Fri, 19 Aug 2022 19:03:08 +0530 Subject: [PATCH] Cleaned up trial days display --- ghost/portal/src/components/common/ProductsSection.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ghost/portal/src/components/common/ProductsSection.js b/ghost/portal/src/components/common/ProductsSection.js index f677a3837e..8962283cb7 100644 --- a/ghost/portal/src/components/common/ProductsSection.js +++ b/ghost/portal/src/components/common/ProductsSection.js @@ -565,9 +565,9 @@ function ProductCardAlternatePrice({price}) { ); } -function ProductCardTrialDays({trialDays, discount}) { +function ProductCardTrialDays({trialDays, discount, selectedInterval}) { const {site} = useContext(AppContext); - const {selectedInterval} = useContext(ProductsContext); + if (hasFreeTrialTier({site})) { if (trialDays) { return ( @@ -583,7 +583,7 @@ function ProductCardTrialDays({trialDays, discount}) { {discount}% discount ); } - + return null; } @@ -611,7 +611,7 @@ function ProductCardPrice({product}) { {formatNumber(getStripeAmount(activePrice.amount))} /{activePrice.interval} - + {(selectedInterval === 'year' ? : '')}