(type: string, enabled = true)
| 31 | }; |
| 32 | |
| 33 | export const getDataSources = (type: string, enabled = true) => { |
| 34 | const { filesQuery, dataSourcesQuery } = useUserSettings(); |
| 35 | const { instance } = useMsal(); |
| 36 | const client = DataSourceClientFactory(type, filesQuery.data, dataSourcesQuery.data, instance); |
| 37 | return useQuery(['datasource', type], () => fetchDataSources(client), { |
| 38 | enabled: enabled, |
| 39 | }); |
| 40 | }; |
| 41 | |
| 42 | export const getDataSource = (type: string, account: string, container: string, enabled = true) => { |
| 43 | const { dataSourcesQuery, filesQuery } = useUserSettings(); |
no test coverage detected