diff --git a/studio/components/interfaces/Settings/General/CustomDomainConfig/CustomDomainConfig.tsx b/studio/components/interfaces/Settings/General/CustomDomainConfig/CustomDomainConfig.tsx index 9e6192fab4b..e4c254536a5 100644 --- a/studio/components/interfaces/Settings/General/CustomDomainConfig/CustomDomainConfig.tsx +++ b/studio/components/interfaces/Settings/General/CustomDomainConfig/CustomDomainConfig.tsx @@ -5,7 +5,10 @@ import { IconAlertCircle } from 'ui' import { useStore } from 'hooks' import { useParams } from 'common/hooks' import { useProjectApiQuery } from 'data/config/project-api-query' -import { useCustomDomainsQuery } from 'data/custom-domains/custom-domains-query' +import { + CustomDomainResponse, + useCustomDomainsQuery, +} from 'data/custom-domains/custom-domains-query' import Panel from 'components/ui/Panel' import { FormHeader } from 'components/ui/Forms' import UpgradeToPro from 'components/ui/UpgradeToPro' @@ -75,7 +78,9 @@ const CustomDomainConfig = () => { {isSuccess && (
- {(data.status === '2_initiated' || data.status === '3_challenge_verified') && ( + {(data.status === '1_not_started' || + data.status === '2_initiated' || + data.status === '3_challenge_verified') && ( )} -
-
-
-

Type

-
-
-
- + {customDomain.ssl.status === 'validation_timed_out' ? ( + + Please click "Verify" again to retry the validation of the records + + ) : ( +
+
+
+

Type

+
+
+
+ +
+
+
+
+ +
-
-
- + + {customDomain.verification_errors?.includes( + 'custom hostname does not CNAME to this zone.' + ) && ( + + )} + + {customDomain.ownership_verification && ( + + )} + + {customDomain.ssl.status === 'pending_validation' && ( + + )} + + {customDomain.ssl.status === 'pending_deployment' && ( +
+ +

+ SSL certificate is being deployed. Please wait a few minutes and try again. +

-
+ )}
+ )} - {customDomain.verification_errors?.includes( - 'custom hostname does not CNAME to this zone.' - ) && ( - - )} - - {customDomain.ownership_verification && ( - - )} - - {customDomain.ssl.status === 'pending_validation' && ( - - )} - - {customDomain.ssl.status === 'pending_deployment' && ( -
- -

- SSL certificate is being deployed. Please wait a few minutes and try again. -

-
- )} -

One of the records requires you to replace the CNAME record set up in the first step diff --git a/studio/components/interfaces/Settings/General/CustomDomainConfig/CustomDomainsConfigureHostname.tsx b/studio/components/interfaces/Settings/General/CustomDomainConfig/CustomDomainsConfigureHostname.tsx index 2405d7bfe39..4a3349638cc 100644 --- a/studio/components/interfaces/Settings/General/CustomDomainConfig/CustomDomainsConfigureHostname.tsx +++ b/studio/components/interfaces/Settings/General/CustomDomainConfig/CustomDomainsConfigureHostname.tsx @@ -57,6 +57,7 @@ const CustomDomainsConfigureHostname = () => { }) } catch (error: any) { ui.setNotification({ + error, category: 'error', message: error.message, }) diff --git a/studio/data/custom-domains/custom-domains-query.ts b/studio/data/custom-domains/custom-domains-query.ts index 8d5f4f2ea14..5bd0bcd6fda 100644 --- a/studio/data/custom-domains/custom-domains-query.ts +++ b/studio/data/custom-domains/custom-domains-query.ts @@ -27,7 +27,7 @@ type Ssl = { id: string type: string method: string - status: string + status: 'pending_validation' | 'pending_deployment' | 'validation_timed_out' txt_name?: string txt_value?: string settings: Settings