diff --git a/packages/console/src/pages/TenantSettings/TenantDomainSettings/AddDomainForm/index.tsx b/packages/console/src/pages/TenantSettings/TenantDomainSettings/AddDomainForm/index.tsx index 2aa3f58eb..423a19bf4 100644 --- a/packages/console/src/pages/TenantSettings/TenantDomainSettings/AddDomainForm/index.tsx +++ b/packages/console/src/pages/TenantSettings/TenantDomainSettings/AddDomainForm/index.tsx @@ -17,11 +17,10 @@ type FormData = { }; type Props = { - isCustomDomainEnabled: boolean; onCustomDomainAdded: (domain: Domain) => void; }; -function AddDomainForm({ isCustomDomainEnabled, onCustomDomainAdded }: Props) { +function AddDomainForm({ onCustomDomainAdded }: Props) { const { t } = useTranslation(undefined, { keyPrefix: 'admin_console' }); const { register, @@ -48,7 +47,6 @@ function AddDomainForm({ isCustomDomainEnabled, onCustomDomainAdded }: Props) { return (
diff --git a/packages/console/src/pages/TenantSettings/TenantDomainSettings/index.tsx b/packages/console/src/pages/TenantSettings/TenantDomainSettings/index.tsx index 660350ede..80f0587c8 100644 --- a/packages/console/src/pages/TenantSettings/TenantDomainSettings/index.tsx +++ b/packages/console/src/pages/TenantSettings/TenantDomainSettings/index.tsx @@ -1,16 +1,10 @@ import { withAppInsights } from '@logto/app-insights/react'; -import { useContext } from 'react'; -import FeatureTag from '@/components/FeatureTag'; import FormCard from '@/components/FormCard'; -import InlineUpsell from '@/components/InlineUpsell'; import PageMeta from '@/components/PageMeta'; -import { ReservedPlanId } from '@/consts/subscriptions'; -import { TenantsContext } from '@/contexts/TenantsProvider'; import FormField from '@/ds-components/FormField'; import useCustomDomain from '@/hooks/use-custom-domain'; import useDocumentationUrl from '@/hooks/use-documentation-url'; -import useSubscriptionPlan from '@/hooks/use-subscription-plan'; import Skeleton from '../components/Skeleton'; @@ -20,31 +14,18 @@ import DefaultDomain from './DefaultDomain'; import * as styles from './index.module.scss'; function TenantDomainSettings() { - const { currentTenantId } = useContext(TenantsContext); const { data: customDomain, isLoading: isLoadingCustomDomain, mutate } = useCustomDomain(true); - const { data: currentPlan, error: fetchCurrentPlanError } = useSubscriptionPlan(currentTenantId); - const isLoadingCurrentPlan = !currentPlan && !fetchCurrentPlanError; const { getDocumentationUrl } = useDocumentationUrl(); - if (isLoadingCustomDomain || isLoadingCurrentPlan) { + if (isLoadingCustomDomain) { return ; } - const customDomainEnabled = - Boolean(currentPlan?.quota.customDomainEnabled) || - /** - * Note: this is for tenants which already have a custom domain before we have subscription features. - */ - Boolean(customDomain); - return (
- } description="domain.custom.custom_domain_description" learnMoreLink={getDocumentationUrl('docs/recipes/custom-domain')} > @@ -52,13 +33,7 @@ function TenantDomainSettings() { {customDomain ? ( ) : ( - - )} - {!customDomain && !customDomainEnabled && ( - + )}