fix(ChooseAccountSubstep): show app connections

This commit is contained in:
Ali BARIN
2022-02-04 22:06:07 +01:00
committed by Ömer Faruk Aydın
parent 50015ae073
commit dfc95cafe0
2 changed files with 1 additions and 7 deletions

View File

@@ -23,10 +23,7 @@ function ChooseAccountSubstep(props: ChooseAccountSubstepProps): React.ReactElem
const { appKey, connectionId, onChange } = props;
const { data, loading } = useQuery(GET_APP_CONNECTIONS, { variables: { key: appKey }});
const app: App = data?.getApp;
const connections = app?.connections || [];
const connectionOptions = React.useMemo(() => connections.map((connection) => optionGenerator(connection)), [connections]);
const connectionOptions = React.useMemo(() => (data?.getApp as App)?.connections?.map((connection) => optionGenerator(connection)) || [], [data]);
const handleChange = React.useCallback((event: React.SyntheticEvent, selectedOption: unknown) => {
if (typeof selectedOption === 'object') {

View File

@@ -49,9 +49,6 @@ export const GET_APPS = gql`
}
}
}
connections {
id
}
triggers {
name
key