2025-01-04 14:07:39 +05:30
|
|
|
import { getDeploymentsData } from 'api/customDomain/getDeploymentsData';
|
|
|
|
|
import { AxiosError, AxiosResponse } from 'axios';
|
|
|
|
|
import { useQuery, UseQueryResult } from 'react-query';
|
|
|
|
|
import { DeploymentsDataProps } from 'types/api/customDomain/types';
|
|
|
|
|
|
2025-04-02 01:12:42 +05:30
|
|
|
export const useGetDeploymentsData = (
|
|
|
|
|
isEnabled: boolean,
|
|
|
|
|
): UseQueryResult<AxiosResponse<DeploymentsDataProps>, AxiosError> =>
|
2025-01-04 14:07:39 +05:30
|
|
|
useQuery<AxiosResponse<DeploymentsDataProps>, AxiosError>({
|
|
|
|
|
queryKey: ['getDeploymentsData'],
|
|
|
|
|
queryFn: () => getDeploymentsData(),
|
2025-04-02 01:12:42 +05:30
|
|
|
enabled: isEnabled,
|
2025-01-04 14:07:39 +05:30
|
|
|
});
|