Skip to content

Commit

Permalink
chore(console): remove new pro plan dev feature guard (#6890)
Browse files Browse the repository at this point in the history
* fix(console): should not apply dev guard

should not apply dev guard

* chore(console): remove new pro plan dev feature guard
remove new pro plan dev feature guard
  • Loading branch information
simeng-li authored Dec 18, 2024
1 parent f1b1d9e commit 10766d4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 14 deletions.
14 changes: 6 additions & 8 deletions packages/console/src/consts/subscriptions.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { ReservedPlanId } from '@logto/schemas';

import { isDevFeaturesEnabled } from './env';

/**
* Shared quota limits between the featured plan content in the `CreateTenantModal` and the `PlanComparisonTable`.
*/
Expand All @@ -25,14 +23,14 @@ export const tokenAddOnUnitPrice = 80;
export const hooksAddOnUnitPrice = 2;
/* === Add-on unit price (in USD) === */

// TODO: Remove this dev feature flag when we have the new Pro202411 plan released.
/**
* In console, only featured plans are shown in the plan selection component.
* we will this to filter out the public visible featured plans.
*/
export const featuredPlanIds: readonly string[] = isDevFeaturesEnabled
? Object.freeze([ReservedPlanId.Free, ReservedPlanId.Pro202411])
: Object.freeze([ReservedPlanId.Free, ReservedPlanId.Pro]);
export const featuredPlanIds: readonly string[] = Object.freeze([
ReservedPlanId.Free,
ReservedPlanId.Pro202411,
]);

/**
* The order of plans in the plan selection content component.
Expand All @@ -47,5 +45,5 @@ export const planIdOrder: Record<string, number> = Object.freeze({

export const checkoutStateQueryKey = 'checkout-state';

/** The latest pro plan id we are using. TODO: Remove this when we have the new Pro202411 plan released. */
export const latestProPlanId = isDevFeaturesEnabled ? ReservedPlanId.Pro202411 : ReservedPlanId.Pro;
/** The latest pro plan id we are using. */
export const latestProPlanId = ReservedPlanId.Pro202411;
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { type TFuncKey } from 'i18next';
import { Fragment, useMemo } from 'react';
import { useTranslation } from 'react-i18next';

import { isDevFeaturesEnabled } from '@/consts/env';
import {
freePlanAuditLogsRetentionDays,
freePlanM2mLimit,
Expand Down Expand Up @@ -64,11 +63,9 @@ function PlanComparisonTable() {
const mauLimitTip = t('mau_tip');
const includedTokens = t('quota.included_tokens');
const includedTokensTip = t('tokens_tip');
const proPlanIncludedTokens = isDevFeaturesEnabled ? '100,000' : t('million', { value: 1 });
const freePlanIncludedTokens = isDevFeaturesEnabled ? '100,000' : '500,000';
const proPlanTokenPrice = isDevFeaturesEnabled
? t('extra_token_price', { value: 0.08, amount: 100 })
: t('extra_token_price', { value: 80, amount: 1_000_000 });
const proPlanIncludedTokens = '100,000';
const freePlanIncludedTokens = '100,000';
const proPlanTokenPrice = t('extra_token_price', { value: 0.08, amount: 100 });

// Applications
const totalApplications = t('application.total');
Expand Down

0 comments on commit 10766d4

Please sign in to comment.