0
Fork 0
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:
Djordje Vlaisavljevic 2022-08-08 14:56:06 +02:00
parent 2e8fa05bd9
commit 05e515ce2c

View file

@ -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>