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:
parent
92f47ef7da
commit
e89147acb3
7 changed files with 6 additions and 15 deletions
|
@ -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>
|
||||
|
|
|
@ -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} />
|
||||
* ))}
|
||||
* ```
|
||||
*/
|
||||
|
|
|
@ -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',
|
||||
};
|
||||
|
||||
|
|
|
@ -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,
|
||||
};
|
||||
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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]
|
||||
);
|
||||
|
||||
|
|
|
@ -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]) => {
|
||||
|
|
Loading…
Add table
Reference in a new issue