slug website
This commit is contained in:
@@ -51,7 +51,18 @@ export const useGetDetailService = (serviceId: string) =>
|
||||
queryFn: () => api.getDetailService(serviceId),
|
||||
});
|
||||
|
||||
export const useGetProductBySlug = (slug: string) =>
|
||||
useQuery({
|
||||
queryKey: ["product-detail", slug],
|
||||
queryFn: () => api.getProductBySlug(slug),
|
||||
});
|
||||
|
||||
export const detailServiceQueryOptions = (serviceId: string) => ({
|
||||
queryKey: ["service-detail", serviceId],
|
||||
queryFn: () => api.getDetailService(serviceId),
|
||||
});
|
||||
|
||||
export const getProductBySlugQueryOptions = (slug: string) => ({
|
||||
queryKey: ["product-detail", slug],
|
||||
queryFn: () => api.getProductBySlug(slug),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user