Skip to content

Commit

Permalink
Merge branch 'main' into PPF-553/bugfix-organizers-give-409-error
Browse files Browse the repository at this point in the history
  • Loading branch information
grubolsch authored Jul 9, 2024
2 parents f8a19ee + 6922878 commit 9bd55b4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions resources/ts/Pages/Integrations/New.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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 (
Expand Down

0 comments on commit 9bd55b4

Please sign in to comment.