feat: show only triggerable apps in trigger steps
This commit is contained in:

committed by
Ömer Faruk Aydın

parent
89fbfd9dfc
commit
8364695f8a
@@ -63,7 +63,7 @@ export default function FlowStep(props: FlowStepProps): React.ReactElement | nul
|
|||||||
const initialRender = React.useRef<boolean>(true);
|
const initialRender = React.useRef<boolean>(true);
|
||||||
const formatMessage = useFormatMessage();
|
const formatMessage = useFormatMessage();
|
||||||
const [currentSubstep, setCurrentSubstep] = React.useState<number | null>(0);
|
const [currentSubstep, setCurrentSubstep] = React.useState<number | null>(0);
|
||||||
const { data } = useQuery(GET_APPS)
|
const { data } = useQuery(GET_APPS, { variables: { onlyWithTriggers: isTrigger }});
|
||||||
const apps: App[] = data?.getApps;
|
const apps: App[] = data?.getApps;
|
||||||
const app = apps?.find((currentApp: App) => currentApp.key === step.appKey);
|
const app = apps?.find((currentApp: App) => currentApp.key === step.appKey);
|
||||||
|
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
import { gql } from '@apollo/client';
|
import { gql } from '@apollo/client';
|
||||||
|
|
||||||
export const GET_APPS = gql`
|
export const GET_APPS = gql`
|
||||||
query GetApps($name: String) {
|
query GetApps($name: String, $onlyWithTriggers: Boolean) {
|
||||||
getApps(name: $name) {
|
getApps(name: $name, onlyWithTriggers: $onlyWithTriggers) {
|
||||||
name
|
name
|
||||||
key
|
key
|
||||||
iconUrl
|
iconUrl
|
||||||
|
Reference in New Issue
Block a user