feat: add app connections w/ testing and deleting functions

This commit is contained in:
Ali BARIN
2021-10-18 23:58:40 +02:00
parent 672cc4c60c
commit 2293c939e7
27 changed files with 349 additions and 34 deletions

View File

@@ -0,0 +1,23 @@
import { useQuery } from '@apollo/client';
import { GET_APP_CONNECTIONS } from 'graphql/queries/get-app-connections';
import AppConnectionRow from 'components/AppConnectionRow';
import type { Connection } from 'types/connection';
type AppConnectionsProps = {
appKey: String;
}
export default function AppConnections(props: AppConnectionsProps) {
const { appKey: key } = props;
const { data } = useQuery(GET_APP_CONNECTIONS, { variables: { key } });
const appConnections: Connection[] = data?.getApp?.connections || [];
return (
<>
{appConnections.map((appConnection: Connection) => (
<AppConnectionRow key={appConnection.id} connection={appConnection} />
))}
</>
)
};