mirror of
https://github.com/SigNoz/signoz.git
synced 2025-12-18 16:07:10 +00:00
13 lines
444 B
TypeScript
13 lines
444 B
TypeScript
|
|
import { getAwsServices } from 'api/integrations/aws';
|
||
|
|
import { REACT_QUERY_KEY } from 'constants/reactQueryKeys';
|
||
|
|
import { Service } from 'container/CloudIntegrationPage/ServicesSection/types';
|
||
|
|
import { useQuery, UseQueryResult } from 'react-query';
|
||
|
|
|
||
|
|
export function useGetAccountServices(
|
||
|
|
accountId?: string,
|
||
|
|
): UseQueryResult<Service[]> {
|
||
|
|
return useQuery([REACT_QUERY_KEY.AWS_SERVICES, accountId], () =>
|
||
|
|
getAwsServices(accountId),
|
||
|
|
);
|
||
|
|
}
|