(type: string, account: string, container: string, filepath: string, enabled = true)
| 49 | }; |
| 50 | |
| 51 | export const useQueryTrack = (type: string, account: string, container: string, filepath: string, enabled = true) => { |
| 52 | const { dataSourcesQuery, filesQuery } = useUserSettings(); |
| 53 | const { instance } = useMsal(); |
| 54 | const client = MetadataClientFactory(type, filesQuery.data, dataSourcesQuery.data, instance); |
| 55 | |
| 56 | return useQuery<number[][]>({ |
| 57 | queryKey: ['track', account, container, filepath ], |
| 58 | queryFn: ({signal}) => { |
| 59 | return client.track(account, container, filepath, signal); |
| 60 | }, |
| 61 | enabled: enabled && !!filesQuery.data && !!dataSourcesQuery.data, |
| 62 | }); |
| 63 | }; |
| 64 | |
| 65 | export const getMeta = (type: string, account: string, container: string, filePath: string, enabled = true) => { |
| 66 | const { dataSourcesQuery, filesQuery } = useUserSettings(); |
no test coverage detected