0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-02-17 22:04:19 -05:00

refactor(console): update subscription plan ID (#6074)

This commit is contained in:
Darcy Ye 2024-06-20 19:08:16 +08:00 committed by GitHub
parent 92f47ef7da
commit e89147acb3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 6 additions and 15 deletions

View file

@ -92,7 +92,7 @@ function PlanCardItem({ plan, onSelect, buttonProps }: Props) {
disabled={(isFreePlan && isFreeTenantExceeded) || buttonProps?.disabled}
/>
</div>
{planId === ReservedPlanId.Hobby && (
{planId === ReservedPlanId.Pro && (
<div className={styles.mostPopularTag}>{t('most_popular')}</div>
)}
</div>

View file

@ -43,7 +43,7 @@ type Props = {
* // both free and paid features
* {features.map((feature) => (
* hasPaywall(feature) &&
* <FeatureTag isVisible={hasAccess(feature)} plan={ReservedPlanId.Hobby} />
* <FeatureTag isVisible={hasAccess(feature)} plan={ReservedPlanId.Pro} />
* ))}
* ```
*/

View file

@ -8,7 +8,6 @@ const registeredPlanDescriptionPhrasesMap: Record<
TFuncKey<'translation', 'admin_console.subscription'> | undefined
> = {
[ReservedPlanId.Free]: 'free_plan_description',
[ReservedPlanId.Hobby]: 'pro_plan_description',
[ReservedPlanId.Pro]: 'pro_plan_description',
};

View file

@ -7,7 +7,6 @@ import { type SubscriptionPlanQuota } from '@/types/subscriptions';
*/
export const ticketSupportResponseTimeMap: Record<string, number> = {
[ReservedPlanId.Free]: 0,
[ReservedPlanId.Hobby]: 48,
[ReservedPlanId.Pro]: 48,
};

View file

@ -13,15 +13,11 @@ export const proPlanAuditLogsRetentionDays = 14;
/**
* In console, only featured plans are shown in the plan selection component.
*/
export const featuredPlanIds: string[] = [ReservedPlanId.Free, ReservedPlanId.Hobby];
export const featuredPlanIds: string[] = [ReservedPlanId.Free, ReservedPlanId.Pro];
/**
* The order of featured plans in the plan selection content component.
*/
export const featuredPlanIdOrder: string[] = [
ReservedPlanId.Free,
ReservedPlanId.Hobby,
ReservedPlanId.Pro,
];
export const featuredPlanIdOrder: string[] = [ReservedPlanId.Free, ReservedPlanId.Pro];
export const checkoutStateQueryKey = 'checkout-state';

View file

@ -27,10 +27,7 @@ function MauLimitExceededNotification({ activeUsers, currentPlan, className }: P
const [isLoading, setIsLoading] = useState(false);
const proPlan = useMemo(
/**
* Note: now the hobby plan is treated as the new pro plan
*/
() => subscriptionPlans.find(({ id }) => id === ReservedPlanId.Hobby),
() => subscriptionPlans.find(({ id }) => id === ReservedPlanId.Pro),
[subscriptionPlans]
);

View file

@ -63,7 +63,7 @@ function NotEligibleSwitchPlanModalContent({
>
{t(isDowngrade ? 'downgrade_description' : 'upgrade_description')}
</Trans>
{!isDowngrade && id === ReservedPlanId.Hobby && t('upgrade_pro_tip')}
{!isDowngrade && id === ReservedPlanId.Pro && t('upgrade_pro_tip')}
</div>
<ul className={styles.list}>
{orderedEntries.map(([quotaKey, quotaValue]) => {