diff --git a/apps/admin-x-settings/src/components/settings/membership/portal/SignupOptions.tsx b/apps/admin-x-settings/src/components/settings/membership/portal/SignupOptions.tsx index 3e4425ff14..2f7614467e 100644 --- a/apps/admin-x-settings/src/components/settings/membership/portal/SignupOptions.tsx +++ b/apps/admin-x-settings/src/components/settings/membership/portal/SignupOptions.tsx @@ -61,7 +61,7 @@ const SignupOptions: React.FC<{ if (localTiers) { localTiers.forEach((tier) => { - if (tier.name === 'Free') { + if (tier.type === 'free') { tiersCheckboxes.push({ checked: (portalPlans.includes('free')), disabled: isDisabled, diff --git a/apps/admin-x-settings/src/components/settings/membership/tiers/TierDetailModal.tsx b/apps/admin-x-settings/src/components/settings/membership/tiers/TierDetailModal.tsx index 8fe1b042cc..6449b3b32c 100644 --- a/apps/admin-x-settings/src/components/settings/membership/tiers/TierDetailModal.tsx +++ b/apps/admin-x-settings/src/components/settings/membership/tiers/TierDetailModal.tsx @@ -1,6 +1,7 @@ import NiceModal, {useModal} from '@ebay/nice-modal-react'; import React, {useEffect, useRef} from 'react'; import TierDetailPreview from './TierDetailPreview'; +import useFeatureFlag from '../../../../hooks/useFeatureFlag'; import useSettingGroup from '../../../../hooks/useSettingGroup'; import {Button, ButtonProps, ConfirmationModal, CurrencyField, Form, Heading, Icon, Modal, Select, SortableList, TextField, Toggle, URLTextField, showToast, useSortableIndexedList} from '@tryghost/admin-x-design-system'; import {ErrorMessages, useForm, useHandleError} from '@tryghost/admin-x-framework/hooks'; @@ -25,6 +26,8 @@ const TierDetailModalContent: React.FC<{tier?: Tier}> = ({tier}) => { const handleError = useHandleError(); const {localSettings, siteData} = useSettingGroup(); const siteTitle = getSettingValues(localSettings, ['title']) as string[]; + const hasPortalImprovements = useFeatureFlag('portalImprovements'); + const allowNameChange = !isFreeTier || hasPortalImprovements; const validators: {[key in keyof Tier]?: () => string | undefined} = { name: () => (formState.name ? undefined : 'You must specify a name'), @@ -189,7 +192,7 @@ const TierDetailModalContent: React.FC<{tier?: Tier}> = ({tier}) => {
- {!isFreeTier &&