feat: filter flows by appKey in app flows

This commit is contained in:
Ali BARIN
2022-05-09 14:15:40 +02:00
parent 7c543ff8ed
commit 91e209e961
3 changed files with 10 additions and 5 deletions

View File

@@ -4,8 +4,13 @@ import { GET_FLOWS } from 'graphql/queries/get-flows';
import AppFlowRow from 'components/AppFlowRow';
import type { IFlow } from '@automatisch/types';
export default function AppFlows(): React.ReactElement {
const { data } = useQuery(GET_FLOWS);
type AppFlowsProps = {
appKey: string;
}
export default function AppFlows(props: AppFlowsProps): React.ReactElement {
const { appKey } = props;
const { data } = useQuery(GET_FLOWS, { variables: { appKey }});
const appFlows: IFlow[] = data?.getFlows || [];
return (