product-card чтобы запросы с undefined не сыпались
All checks were successful
Deploy / build (push) Successful in 46s

This commit is contained in:
alsaze 2025-09-26 02:07:26 +03:00
parent 2b75aaf7bf
commit 7c811a4841
2 changed files with 2 additions and 0 deletions

View File

@ -6,5 +6,6 @@ export const useGetProductsDetail = (productId: MaybeRef<number>) => {
return useQuery({ return useQuery({
queryKey: ['get-products-detail', productId], queryKey: ['get-products-detail', productId],
queryFn: () => getProductsDetail(unref(productId)), queryFn: () => getProductsDetail(unref(productId)),
enabled: !!unref(productId),
}) })
} }

View File

@ -6,5 +6,6 @@ export const useGetProductsVariationsList = (productId: MaybeRef<number>) => {
return useQuery({ return useQuery({
queryKey: ['get-products-variations-list', productId], queryKey: ['get-products-variations-list', productId],
queryFn: () => getProductsVariationsList(unref(productId)), queryFn: () => getProductsVariationsList(unref(productId)),
enabled: !!unref(productId),
}) })
} }