mirror of
https://github.com/SigNoz/signoz.git
synced 2025-12-28 15:48:12 +00:00
Enhance platform to handle cloud, self-hosted, community, and enterprise user types with tailored routing, error handling, and feature access.
14 lines
544 B
TypeScript
14 lines
544 B
TypeScript
import { getDeploymentsData } from 'api/customDomain/getDeploymentsData';
|
|
import { AxiosError, AxiosResponse } from 'axios';
|
|
import { useQuery, UseQueryResult } from 'react-query';
|
|
import { DeploymentsDataProps } from 'types/api/customDomain/types';
|
|
|
|
export const useGetDeploymentsData = (
|
|
isEnabled: boolean,
|
|
): UseQueryResult<AxiosResponse<DeploymentsDataProps>, AxiosError> =>
|
|
useQuery<AxiosResponse<DeploymentsDataProps>, AxiosError>({
|
|
queryKey: ['getDeploymentsData'],
|
|
queryFn: () => getDeploymentsData(),
|
|
enabled: isEnabled,
|
|
});
|