fix: Incorrect integration settings for Draw.IO being used

This commit is contained in:
Tom Moor
2022-09-22 22:49:37 -04:00
parent 39e1f43598
commit 996a11f5e3
2 changed files with 6 additions and 5 deletions

View File

@@ -1,4 +1,3 @@
import { head } from "lodash";
import { observer } from "mobx-react";
import { BuildingBlocksIcon } from "outline-icons";
import * as React from "react";
@@ -32,9 +31,11 @@ function Drawio() {
});
}, [integrations]);
const integration = head(integrations.orderedData) as
| Integration<IntegrationType.Embed>
| undefined;
const integration = integrations.orderedData.find(
(integration) =>
integration.type === IntegrationType.Embed &&
integration.service === SERVICE_NAME
) as Integration<IntegrationType.Embed> | undefined;
const { register, handleSubmit: formHandleSubmit, formState } = useForm<
FormData

View File

@@ -40,7 +40,7 @@ function Slack() {
const commandIntegration = find(
integrations.slackIntegrations,
(i) => i.type === "command"
(i) => i.type === IntegrationType.Command
);
const groupedCollections = collections.orderedData