Files
automatisch/packages/web/src/components/AppFlows/index.tsx
2022-01-20 17:09:12 +01:00

19 lines
474 B
TypeScript

import { useQuery } from '@apollo/client';
import { GET_FLOWS } from 'graphql/queries/get-flows';
import AppFlowRow from 'components/AppFlowRow';
import type { Flow } from 'types/flow';
export default function AppFlows(): React.ReactElement {
const { data } = useQuery(GET_FLOWS);
const appFlows: Flow[] = data?.getFlows || [];
return (
<>
{appFlows.map((appFlow: Flow) => (
<AppFlowRow key={appFlow.id} flow={appFlow} />
))}
</>
)
};