Updated free tier placeholder value ENG-556 (#19585)

refs ENG-556
This commit is contained in:
Djordje Vlaisavljevic 2024-01-25 19:27:55 +00:00 committed by GitHub
parent eb189c8045
commit 18d6d72c41
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 7 deletions

View File

@ -26,7 +26,7 @@ const TierDetailModalContent: React.FC<{tier?: Tier}> = ({tier}) => {
const [hasFreeTrial, setHasFreeTrial] = React.useState(!!tier?.trial_days);
const handleError = useHandleError();
const {localSettings, siteData} = useSettingGroup();
const [siteTitle, portalPlansJson] = getSettingValues(localSettings, ['title', 'portal_plans']) as string[];
const [portalPlansJson] = getSettingValues(localSettings, ['portal_plans']) as string[];
const hasPortalImprovements = useFeatureFlag('portalImprovements');
const allowNameChange = !isFreeTier || hasPortalImprovements;
const portalPlans = JSON.parse(portalPlansJson?.toString() || '[]') as string[];
@ -223,7 +223,7 @@ const TierDetailModalContent: React.FC<{tier?: Tier}> = ({tier}) => {
<TextField
autoComplete='off'
autoFocus={isFreeTier}
placeholder={isFreeTier ? `Free preview of ${siteTitle}` : 'Full access to premium content'}
placeholder={isFreeTier ? `Free preview` : 'Full access to premium content'}
title='Description'
value={formState.description || ''}
onChange={e => updateForm(state => ({...state, description: e.target.value}))}

View File

@ -1,10 +1,8 @@
import React, {useState} from 'react';
import clsx from 'clsx';
import useSettingGroup from '../../../../hooks/useSettingGroup';
import {Button, Heading, Icon} from '@tryghost/admin-x-design-system';
import {TierFormState} from './TierDetailModal';
import {currencyToDecimal, getSymbol} from '../../../../utils/currency';
import {getSettingValues} from '@tryghost/admin-x-framework/api/settings';
import {numberWithCommas} from '../../../../utils/helpers';
interface TierDetailPreviewProps {
@ -70,8 +68,6 @@ const DiscountLabel: React.FC<{discount: number}> = ({discount}) => {
const TierDetailPreview: React.FC<TierDetailPreviewProps> = ({tier, isFreeTier}) => {
const [showingYearly, setShowingYearly] = useState(false);
const {localSettings} = useSettingGroup();
const siteTitle = getSettingValues(localSettings, ['title']) as string[];
const name = tier?.name || '';
const description = tier?.description || '';
@ -111,7 +107,7 @@ const TierDetailPreview: React.FC<TierDetailPreviewProps> = ({tier, isFreeTier})
</div>
<div className="flex-column flex w-full flex-1">
<div className="flex-1">
<div className={`mt-4 w-full text-[1.55rem] font-semibold leading-snug text-grey-900 ${!description && 'opacity-30'}`}>{description || (isFreeTier ? `Free preview of ${siteTitle}` : 'Full access to premium content')}</div>
<div className={`mt-4 w-full text-[1.55rem] font-semibold leading-snug text-grey-900 ${!description && 'opacity-30'}`}>{description || (isFreeTier ? `Free preview` : 'Full access to premium content')}</div>
<TierBenefits benefits={benefits} />
</div>
</div>