diff --git a/studio/components/interfaces/Settings/General/CustomDomainConfig/CustomDomainConfig.tsx b/studio/components/interfaces/Settings/General/CustomDomainConfig/CustomDomainConfig.tsx index 261746b733d..6ce9eb610cb 100644 --- a/studio/components/interfaces/Settings/General/CustomDomainConfig/CustomDomainConfig.tsx +++ b/studio/components/interfaces/Settings/General/CustomDomainConfig/CustomDomainConfig.tsx @@ -36,46 +36,42 @@ const CustomDomainConfig = () => { return (
- {data?.status === '0_no_hostname_configured' ? ( + {isLoading ? ( + + + + + + ) : isError ? ( + + +
+ +

+ Failed to retrieve custom domain configuration. Please try again later or{' '} + + contact support + + . +

+
+
+
+ ) : data?.status === '0_no_hostname_configured' ? ( + ) : data?.status === '0_not_allowed' ? ( + } + primaryText="Custom domains are a Pro plan add-on" + projectRef={ref as string} + secondaryText={ + tier === PRICING_TIER_PRODUCT_IDS.FREE + ? 'To configure a custom domain for your project, please upgrade to the Pro plan with the custom domains add-on selected' + : 'To configure a custom domain for your project, please enable the add-on' + } + /> ) : ( - {isLoading && ( - - - - )} - - {data?.status === '0_not_allowed' && ( - - } - primaryText="Custom domains are a Pro plan add-on" - projectRef={ref as string} - secondaryText={ - tier === PRICING_TIER_PRODUCT_IDS.FREE - ? 'To configure a custom domain for your project, please upgrade to the Pro plan with the custom domains add-on selected' - : 'To configure a custom domain for your project, please enable the add-on' - } - /> - - )} - - {isError && ( - -
- -

- Failed to retrieve custom domain configuration. Please try again later or{' '} - - contact support - - . -

-
-
- )} - {isSuccess && (
{(data.status === '2_initiated' || data.status === '3_challenge_verified') && (