Fixed build issues
This commit is contained in:
@@ -27,6 +27,7 @@ export const useCustomersInfiniteQuery = (params?: Record<string, any>) => {
|
||||
initialPageParam: 0,
|
||||
|
||||
getNextPageParam: (lastPage) => {
|
||||
if (!lastPage.meta) return;
|
||||
const { offset, limit, total } = lastPage.meta;
|
||||
|
||||
const nextOffset = offset + limit;
|
||||
@@ -42,6 +43,13 @@ export const useGetAllCustomers = () => {
|
||||
queryFn: () => customersService.getCustomers(),
|
||||
});
|
||||
};
|
||||
export const useGetCustomersDetails = (id: string) => {
|
||||
const queryKey = useMemo(() => ["GET ALL CUSTOMERS", id], [id]);
|
||||
return useQuery({
|
||||
queryKey,
|
||||
queryFn: () => customersService.customerDetails(id),
|
||||
});
|
||||
};
|
||||
export const useAssignCompany = (id: string, successCallback?: () => void) => {
|
||||
const queryClient = useQueryClient();
|
||||
const mutationKey = useMemo(
|
||||
|
||||
Reference in New Issue
Block a user