fix: only show apps with actions in action step

This commit is contained in:
Ali BARIN
2022-10-15 13:35:14 +02:00
parent b5e5ae7321
commit c0dfc101b2
6 changed files with 14 additions and 6 deletions

View File

@@ -49,9 +49,10 @@ function ChooseAppAndEventSubstep(
const editorContext = React.useContext(EditorContext);
const isTrigger = step.type === 'trigger';
const isAction = step.type === 'action';
const { data } = useQuery(GET_APPS, {
variables: { onlyWithTriggers: isTrigger },
variables: { onlyWithTriggers: isTrigger, onlyWithActions: isAction },
});
const apps: IApp[] = data?.getApps;
const app = apps?.find((currentApp: IApp) => currentApp.key === step.appKey);