This commit is contained in:
marzban-dev
2025-02-21 20:00:04 +03:30
parent 2439ebf397
commit c4627ca791
@@ -5,7 +5,7 @@ import { API_ENDPOINTS, QUERY_KEYS } from "~/constants";
// types
export type GetProductsResponse = ApiPaginated<Product>;
export type GetProductsResponse = ApiPaginated<ProductListItem>;
export type GetProductsFilters = {
search?: string | undefined;
@@ -40,8 +40,8 @@ const useGetProducts = (params?: ComputedRef<GetProductsFilters>) => {
price_gte: params?.price_gte,
price_lte: params?.price_lte,
offset: Number(params?.page) * 9 - 9,
limit: 9,
},
limit: 9
}
}
);
@@ -51,7 +51,7 @@ const useGetProducts = (params?: ComputedRef<GetProductsFilters>) => {
return useQuery({
staleTime: 60 * 1000,
queryKey: [QUERY_KEYS.products, params],
queryFn: () => handleGetProducts(params?.value),
queryFn: () => handleGetProducts(params?.value)
});
};