mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-18 02:21:47 -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}) {
|
||||
if (subscriptionHasFreeTrial({sub: subscription})) {
|
||||
// const trialEnd = getDateString(subscription.trial_end_at);
|
||||
const trialEnd = getDateString(subscription.trial_end_at);
|
||||
return (
|
||||
<p className="gh-portal-account-discountcontainer">
|
||||
<div>
|
||||
|
||||
{/* <span>Free Trial till {trialEnd}</span> */}
|
||||
<span>{getSubFreeTrialDaysLeft({sub: subscription})} days left</span>
|
||||
<span>Free Trial – Ends {trialEnd}</span>
|
||||
{/* <span>{getSubFreeTrialDaysLeft({sub: subscription})} days left</span> */}
|
||||
</div>
|
||||
</p>
|
||||
);
|
||||
|
@ -251,13 +250,16 @@ const PaidAccountActions = () => {
|
|||
};
|
||||
|
||||
const hasFreeTrial = subscriptionHasFreeTrial({sub: subscription});
|
||||
if (hasFreeTrial) {
|
||||
oldPriceClassName = 'gh-portal-account-old-price';
|
||||
}
|
||||
if (hasFreeTrial) {
|
||||
return (
|
||||
<>
|
||||
<FreeTrialLabel subscription={subscription} />
|
||||
<p className={oldPriceClassName}>
|
||||
then {label}
|
||||
{label}
|
||||
</p>
|
||||
<FreeTrialLabel subscription={subscription} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
@ -327,9 +329,9 @@ const PaidAccountActions = () => {
|
|||
planLabel = getMemberTierName({member});
|
||||
}
|
||||
const hasFreeTrial = subscriptionHasFreeTrial({sub: subscription});
|
||||
if (hasFreeTrial) {
|
||||
planLabel += ' (Free Trial)';
|
||||
}
|
||||
// if (hasFreeTrial) {
|
||||
// planLabel += ' (Free Trial)';
|
||||
// }
|
||||
return (
|
||||
<>
|
||||
<section>
|
||||
|
|
Loading…
Add table
Reference in a new issue