diff --git a/resources/ts/Pages/Integrations/New.tsx b/resources/ts/Pages/Integrations/New.tsx index 334528fc6..627e05507 100644 --- a/resources/ts/Pages/Integrations/New.tsx +++ b/resources/ts/Pages/Integrations/New.tsx @@ -38,11 +38,13 @@ const New = ({ subscriptions }: Props) => { ) .map((subscription) => subscription.id); + const integrationTypesInfo = useIntegrationTypesInfo(); + const url = new URL(document.location.href); const activeTypeFromUrl = url.searchParams.get("type"); const activeType = isIntegrationType(activeTypeFromUrl) ? activeTypeFromUrl - : IntegrationType.EntryApi; + : integrationTypesInfo?.[0].type ?? IntegrationType.EntryApi; const initialFormValues = { integrationType: activeType, @@ -97,7 +99,6 @@ const New = ({ subscriptions }: Props) => { [IntegrationType.SearchApi, IntegrationType.Widgets] as IntegrationType[] ).includes(data.integrationType); - const integrationTypesInfo = useIntegrationTypesInfo(); const pricingPlans = useGetPricingPlans(data.integrationType, subscriptions); return (