From cd679359e1a9672817800a235794d2c1fbc672e3 Mon Sep 17 00:00:00 2001 From: Xiao Yijun Date: Fri, 9 Jun 2023 10:50:58 +0800 Subject: [PATCH] refactor(console): remove redundant ssl dns config for custom domain (#4012) --- .../CustomDomain/ActivationProcess/index.tsx | 31 ++----------------- 1 file changed, 3 insertions(+), 28 deletions(-) diff --git a/packages/console/src/pages/TenantSettings/TenantDomainSettings/CustomDomain/ActivationProcess/index.tsx b/packages/console/src/pages/TenantSettings/TenantDomainSettings/CustomDomain/ActivationProcess/index.tsx index 7af2fc9f6..c50329a93 100644 --- a/packages/console/src/pages/TenantSettings/TenantDomainSettings/CustomDomain/ActivationProcess/index.tsx +++ b/packages/console/src/pages/TenantSettings/TenantDomainSettings/CustomDomain/ActivationProcess/index.tsx @@ -1,4 +1,4 @@ -import { type Domain, type DomainDnsRecords, type DomainDnsRecord } from '@logto/schemas'; +import { type Domain } from '@logto/schemas'; import DynamicT from '@/components/DynamicT'; import InlineNotification from '@/components/InlineNotification'; @@ -12,32 +12,9 @@ type Props = { customDomain: Domain; }; -const isSetupSslDnsRecord = ({ type, name }: DomainDnsRecord) => - type.toUpperCase() === 'TXT' && name.includes('_acme-challenge'); - function ActivationProcess({ customDomain }: Props) { const { dnsRecords, status: domainStatus, errorMessage } = customDomain; - const { verifyDomainDnsRecord, setupSslDnsRecord } = dnsRecords.reduce<{ - verifyDomainDnsRecord: DomainDnsRecords; - setupSslDnsRecord: DomainDnsRecords; - }>( - (result, record) => - isSetupSslDnsRecord(record) - ? { - ...result, - setupSslDnsRecord: [...result.setupSslDnsRecord, record], - } - : { - ...result, - verifyDomainDnsRecord: [...result.verifyDomainDnsRecord, record], - }, - { - verifyDomainDnsRecord: [], - setupSslDnsRecord: [], - } - ); - return (
{errorMessage && ( @@ -57,16 +34,14 @@ function ActivationProcess({ customDomain }: Props) { tip="domain.custom.checking_dns_tip" domainStatus={domainStatus} > - + - - + />
); }