feat: add single execution page

This commit is contained in:
Ali BARIN
2022-03-16 17:37:06 +01:00
parent c9bf7c9e21
commit f11f523b30
24 changed files with 372 additions and 36 deletions

View File

@@ -1,11 +1,11 @@
import * as React from 'react';
import { useQuery } from '@apollo/client';
import type { IConnection } from '@automatisch/types';
import { GET_APP_CONNECTIONS } from 'graphql/queries/get-app-connections';
import AppConnectionRow from 'components/AppConnectionRow';
import NoResultFound from 'components/NoResultFound';
import useFormatMessage from 'hooks/useFormatMessage';
import type { Connection } from 'types/connection';
import * as URLS from 'config/urls';
type AppConnectionsProps = {
@@ -16,7 +16,7 @@ export default function AppConnections(props: AppConnectionsProps): React.ReactE
const { appKey } = props;
const formatMessage = useFormatMessage();
const { data } = useQuery(GET_APP_CONNECTIONS, { variables: { key: appKey } });
const appConnections: Connection[] = data?.getApp?.connections || [];
const appConnections: IConnection[] = data?.getApp?.connections || [];
const hasConnections = appConnections?.length;
@@ -31,7 +31,7 @@ export default function AppConnections(props: AppConnectionsProps): React.ReactE
return (
<>
{appConnections.map((appConnection: Connection) => (
{appConnections.map((appConnection: IConnection) => (
<AppConnectionRow key={appConnection.id} connection={appConnection} />
))}
</>