diff --git a/packages/console/src/pages/ApiResources/components/CreateForm/Footer.tsx b/packages/console/src/pages/ApiResources/components/CreateForm/Footer.tsx index 02c50acbf..587138b86 100644 --- a/packages/console/src/pages/ApiResources/components/CreateForm/Footer.tsx +++ b/packages/console/src/pages/ApiResources/components/CreateForm/Footer.tsx @@ -1,5 +1,4 @@ import { ReservedPlanId } from '@logto/schemas'; -import { cond } from '@silverhand/essentials'; import { useContext } from 'react'; import { Trans, useTranslation } from 'react-i18next'; @@ -10,7 +9,6 @@ import { isDevFeaturesEnabled } from '@/consts/env'; import { TenantsContext } from '@/contexts/TenantsProvider'; import Button from '@/ds-components/Button'; import useApiResourcesUsage from '@/hooks/use-api-resources-usage'; -import useSubscribe from '@/hooks/use-subscribe'; import useSubscriptionPlan from '@/hooks/use-subscription-plan'; type Props = { @@ -23,7 +21,6 @@ function Footer({ isCreationLoading, onClickCreate }: Props) { const { currentTenantId } = useContext(TenantsContext); const { data: currentPlan } = useSubscriptionPlan(currentTenantId); const { hasReachedLimit } = useApiResourcesUsage(); - const { subscribe, isSubscribeLoading } = useSubscribe(); if ( currentPlan && @@ -35,20 +32,7 @@ function Footer({ isCreationLoading, onClickCreate }: Props) { (!isDevFeaturesEnabled || currentPlan.id === ReservedPlanId.Free) ) { return ( - { - void subscribe({ - // Todo @xiaoyijun [Pricing] Replace 'Hobby' with 'Pro' when pricing is ready, in MVP, we use 'Hobby' as the new pro plan id - planId: ReservedPlanId.Hobby, - tenantId: currentTenantId, - callbackPage: '/api-resources/create', - }); - }) - )} - > + , diff --git a/packages/console/src/pages/Applications/components/CreateForm/Footer/index.tsx b/packages/console/src/pages/Applications/components/CreateForm/Footer/index.tsx index 2ed83eeef..2d7868a44 100644 --- a/packages/console/src/pages/Applications/components/CreateForm/Footer/index.tsx +++ b/packages/console/src/pages/Applications/components/CreateForm/Footer/index.tsx @@ -9,7 +9,6 @@ import { isDevFeaturesEnabled } from '@/consts/env'; import { TenantsContext } from '@/contexts/TenantsProvider'; import Button from '@/ds-components/Button'; import useApplicationsUsage from '@/hooks/use-applications-usage'; -import useSubscribe from '@/hooks/use-subscribe'; import useSubscriptionPlan from '@/hooks/use-subscription-plan'; type Props = { @@ -22,7 +21,6 @@ function Footer({ selectedType, isLoading, onClickCreate }: Props) { const { currentTenantId } = useContext(TenantsContext); const { t } = useTranslation(undefined, { keyPrefix: 'admin_console.upsell.paywall' }); const { data: currentPlan } = useSubscriptionPlan(currentTenantId); - const { subscribe, isSubscribeLoading } = useSubscribe(); const { hasAppsReachedLimit, hasMachineToMachineAppsReachedLimit } = useApplicationsUsage(); if (currentPlan && selectedType) { @@ -32,17 +30,7 @@ function Footer({ selectedType, isLoading, onClickCreate }: Props) { // Todo @xiaoyijun [Pricing] Remove feature flag if (isDevFeaturesEnabled && planId === ReservedPlanId.Free) { return ( - { - void subscribe({ - // Todo @xiaoyijun [Pricing] Replace 'Hobby' with 'Pro' when pricing is ready, in MVP, we use 'Hobby' as the new pro plan id - planId: ReservedPlanId.Hobby, - tenantId: currentTenantId, - callbackPage: '/applications/create', - }); - }} - > + ,