other services
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import * as api from "../service/ServiceService";
|
||||
|
||||
export const useGetSuggestedServices = () => {
|
||||
return useQuery({
|
||||
queryKey: ["suggested-services"],
|
||||
queryFn: () => api.getServiceSuggestedDanak(),
|
||||
});
|
||||
};
|
||||
|
||||
export const useGetCategoriesPublic = () => {
|
||||
return useQuery({
|
||||
queryKey: ["categories-public"],
|
||||
queryFn: () => api.getCategoriesPublic(),
|
||||
});
|
||||
};
|
||||
|
||||
export const useGetServicesByCategory = (categoryId: string) => {
|
||||
return useQuery({
|
||||
queryKey: ["services-category", categoryId],
|
||||
queryFn: () => api.getServicesByCategory(categoryId),
|
||||
enabled: !!categoryId,
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user