paxton-front/api/queries/useGetProductsVariationsList.ts
Veselov bce683c0eb
Some checks failed
Deploy / build-and-deploy (push) Failing after 37s
from v1 to v3
2025-07-28 18:47:33 +03:00

11 lines
365 B
TypeScript

import { useQuery } from '@tanstack/vue-query'
import { unref } from 'vue'
import { getProductsVariationsList } from '~/api/endpoints'
export const useGetProductsVariationsList = (productId: MaybeRef<number>) => {
return useQuery({
queryKey: ['get-products-variations-list', productId],
queryFn: () => getProductsVariationsList(unref(productId)),
})
}