Skip to content

Commit

Permalink
Improved: using pageSize while fetching product stores (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
amansinghbais committed Oct 4, 2024
1 parent 97aa7b8 commit fb36a2b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/services/ProductStoreService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ const fetchProductStoreDetails = async (productStoreId: any): Promise <any> => {
});
}

const fetchProductStores = async (): Promise <any> => {
const fetchProductStores = async (payload: any): Promise <any> => {
return api({
url: "productStores",
method: "get"
method: "get",
params: payload
});
}

Expand Down
2 changes: 1 addition & 1 deletion src/store/modules/productStore/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const actions: ActionTree<ProductStoreState, RootState> = {
let productStores = [];

try {
const resp = await ProductStoreService.fetchProductStores();
const resp = await ProductStoreService.fetchProductStores({ pageSize: 20 });

if(!hasError(resp)) {
productStores = resp.data;
Expand Down

0 comments on commit fb36a2b

Please sign in to comment.