File tree Expand file tree Collapse file tree 2 files changed +0
-30
lines changed
packages/console/src/components/PlanUsage Expand file tree Collapse file tree 2 files changed +0
-30
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,6 @@ import {
1919 getQuotaByKey ,
2020 getToolTipByKey ,
2121 shouldHideQuotaNotice ,
22- filterNewUsageKeysForLegacyPro ,
2322} from './utils' ;
2423
2524type Props = {
@@ -48,10 +47,6 @@ function PlanUsage({ periodicUsage, usageAddOnSkus }: Props) {
4847 ( key ) =>
4948 isPaidTenant || ( onlyShowPeriodicUsage && ( key === 'mauLimit' || key === 'tokenLimit' ) )
5049 )
51- // TODO: remove this filter after the pro plan migration is complete.
52- . filter ( ( key ) => {
53- return filterNewUsageKeysForLegacyPro ( key , planId ) ;
54- } )
5550 . map ( ( key ) => {
5651 return {
5752 usage : getUsageByKey ( key , {
Original file line number Diff line number Diff line change 11import { type AdminConsoleKey } from '@logto/phrases' ;
2- import { ReservedPlanId } from '@logto/schemas' ;
32import { type TFuncKey } from 'i18next' ;
43
54import {
@@ -250,27 +249,3 @@ export const shouldHideQuotaNotice = (
250249 // Hide the quota notice if the basic quota is 0;
251250 return basicQuota [ key ] === 0 ;
252251} ;
253-
254- /**
255- * During the pro plan migration,
256- * we need to hide the new added usage keys for the legacy Pro plan.
257- * - RBAC enabled
258- * - thirdPartyApplicationsLimit
259- *
260- * TODO: clean up this function after the migration is complete.
261- */
262- export const filterNewUsageKeysForLegacyPro = ( key : UsageKey , planId : string ) => {
263- const newUsageKeys = Object . freeze ( [ CustomUsageKey . RbacEnabled , 'thirdPartyApplicationsLimit' ] ) ;
264-
265- if ( ! newUsageKeys . includes ( key ) ) {
266- return true ;
267- }
268-
269- const isProPlanId = isProPlan ( planId ) ;
270-
271- if ( isProPlanId && planId !== ReservedPlanId . Pro202509 ) {
272- return false ; // Hide new usage keys for legacy Pro plan
273- }
274-
275- return true ;
276- } ;
You can’t perform that action at this time.
0 commit comments