mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-10 23:36:14 -05:00
Cleaned up trial days display
This commit is contained in:
parent
d5dedd4765
commit
2c636d16eb
1 changed files with 4 additions and 4 deletions
|
@ -565,9 +565,9 @@ function ProductCardAlternatePrice({price}) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function ProductCardTrialDays({trialDays, discount}) {
|
function ProductCardTrialDays({trialDays, discount, selectedInterval}) {
|
||||||
const {site} = useContext(AppContext);
|
const {site} = useContext(AppContext);
|
||||||
const {selectedInterval} = useContext(ProductsContext);
|
|
||||||
if (hasFreeTrialTier({site})) {
|
if (hasFreeTrialTier({site})) {
|
||||||
if (trialDays) {
|
if (trialDays) {
|
||||||
return (
|
return (
|
||||||
|
@ -611,7 +611,7 @@ function ProductCardPrice({product}) {
|
||||||
<span className="amount">{formatNumber(getStripeAmount(activePrice.amount))}</span>
|
<span className="amount">{formatNumber(getStripeAmount(activePrice.amount))}</span>
|
||||||
<span className="billing-period">/{activePrice.interval}</span>
|
<span className="billing-period">/{activePrice.interval}</span>
|
||||||
</div>
|
</div>
|
||||||
<ProductCardTrialDays trialDays={trialDays} discount={yearlyDiscount} />
|
<ProductCardTrialDays trialDays={trialDays} discount={yearlyDiscount} selectedInterval={selectedInterval} />
|
||||||
</div>
|
</div>
|
||||||
{(selectedInterval === 'year' ? <YearlyDiscount discount={yearlyDiscount} trialDays={trialDays} /> : '')}
|
{(selectedInterval === 'year' ? <YearlyDiscount discount={yearlyDiscount} trialDays={trialDays} /> : '')}
|
||||||
<ProductCardAlternatePrice price={alternatePrice} />
|
<ProductCardAlternatePrice price={alternatePrice} />
|
||||||
|
|
Loading…
Add table
Reference in a new issue