Add frontend imporvements 2

This commit is contained in:
Urtzi Alfaro
2025-09-09 22:27:52 +02:00
parent 2a05048912
commit aff644d793
6 changed files with 32 additions and 30 deletions

View File

@@ -61,9 +61,9 @@ export const inventoryKeys = {
export const useIngredients = (
tenantId: string,
filter?: InventoryFilter,
options?: Omit<UseQueryOptions<PaginatedResponse<IngredientResponse>, ApiError>, 'queryKey' | 'queryFn'>
options?: Omit<UseQueryOptions<IngredientResponse[], ApiError>, 'queryKey' | 'queryFn'>
) => {
return useQuery<PaginatedResponse<IngredientResponse>, ApiError>({
return useQuery<IngredientResponse[], ApiError>({
queryKey: inventoryKeys.ingredients.list(tenantId, filter),
queryFn: () => inventoryService.getIngredients(tenantId, filter),
enabled: !!tenantId,