export const useStockByProductId = (productId: string | null) => {
return api.stock.getStockByProductId.useQuery(
{
productId: productId ?? "", // Seems like I'm hacking around TypeScript...
},
{
enabled: productId !== null,
}
);
};
export const useStockByProductId = (productId: string | null) => {
return api.stock.getStockByProductId.useQuery(
{
productId: productId ?? "", // Seems like I'm hacking around TypeScript...
},
{
enabled: productId !== null,
}
);
};