feat: add app connections w/ testing and deleting functions
This commit is contained in:
23
packages/web/src/components/AppConnections/index.tsx
Normal file
23
packages/web/src/components/AppConnections/index.tsx
Normal 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} />
|
||||
))}
|
||||
</>
|
||||
)
|
||||
};
|
Reference in New Issue
Block a user