Skip to content

Commit

Permalink
Merge pull request #370 from medusajs/fix/product-pagination
Browse files Browse the repository at this point in the history
fix: products pagination
  • Loading branch information
VariableVic authored Oct 3, 2024
2 parents a58f0ba + 1844902 commit 4b904bc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib/data/products.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export const getProductsList = cache(async function ({
queryParams?: HttpTypes.FindParams & HttpTypes.StoreProductParams
}> {
const limit = queryParams?.limit || 12
const offset = (pageParam - 1) * limit
const offset = pageParam * limit
const region = await getRegion(countryCode)

if (!region) {
Expand All @@ -63,6 +63,7 @@ export const getProductsList = cache(async function ({
nextPage: null,
}
}

return sdk.store.product
.list(
{
Expand Down

0 comments on commit 4b904bc

Please sign in to comment.