mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-25 02:31:59 -05:00
Updated free trial design on account home
refs https://github.com/TryGhost/Team/issues/1757
This commit is contained in:
parent
2e8fa05bd9
commit
05e515ce2c
1 changed files with 11 additions and 9 deletions
|
@ -188,13 +188,12 @@ function getOfferLabel({offer, price, subscriptionStartDate}) {
|
||||||
|
|
||||||
function FreeTrialLabel({subscription, priceLabel}) {
|
function FreeTrialLabel({subscription, priceLabel}) {
|
||||||
if (subscriptionHasFreeTrial({sub: subscription})) {
|
if (subscriptionHasFreeTrial({sub: subscription})) {
|
||||||
// const trialEnd = getDateString(subscription.trial_end_at);
|
const trialEnd = getDateString(subscription.trial_end_at);
|
||||||
return (
|
return (
|
||||||
<p className="gh-portal-account-discountcontainer">
|
<p className="gh-portal-account-discountcontainer">
|
||||||
<div>
|
<div>
|
||||||
|
<span>Free Trial – Ends {trialEnd}</span>
|
||||||
{/* <span>Free Trial till {trialEnd}</span> */}
|
{/* <span>{getSubFreeTrialDaysLeft({sub: subscription})} days left</span> */}
|
||||||
<span>{getSubFreeTrialDaysLeft({sub: subscription})} days left</span>
|
|
||||||
</div>
|
</div>
|
||||||
</p>
|
</p>
|
||||||
);
|
);
|
||||||
|
@ -251,13 +250,16 @@ const PaidAccountActions = () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const hasFreeTrial = subscriptionHasFreeTrial({sub: subscription});
|
const hasFreeTrial = subscriptionHasFreeTrial({sub: subscription});
|
||||||
|
if (hasFreeTrial) {
|
||||||
|
oldPriceClassName = 'gh-portal-account-old-price';
|
||||||
|
}
|
||||||
if (hasFreeTrial) {
|
if (hasFreeTrial) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<FreeTrialLabel subscription={subscription} />
|
|
||||||
<p className={oldPriceClassName}>
|
<p className={oldPriceClassName}>
|
||||||
then {label}
|
{label}
|
||||||
</p>
|
</p>
|
||||||
|
<FreeTrialLabel subscription={subscription} />
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -327,9 +329,9 @@ const PaidAccountActions = () => {
|
||||||
planLabel = getMemberTierName({member});
|
planLabel = getMemberTierName({member});
|
||||||
}
|
}
|
||||||
const hasFreeTrial = subscriptionHasFreeTrial({sub: subscription});
|
const hasFreeTrial = subscriptionHasFreeTrial({sub: subscription});
|
||||||
if (hasFreeTrial) {
|
// if (hasFreeTrial) {
|
||||||
planLabel += ' (Free Trial)';
|
// planLabel += ' (Free Trial)';
|
||||||
}
|
// }
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<section>
|
<section>
|
||||||
|
|
Loading…
Add table
Reference in a new issue