Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .changeset/heavy-hotels-lie.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
---

Fix sort order of `additionalProducts` prop in `ProductsCarousel` Makeswift component.
Sort product IDs before sending requests to BC so cache can be utilized in `ProductCarousel`
2 changes: 1 addition & 1 deletion core/lib/makeswift/utils/use-products.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export function useProducts({ collection, collectionLimit = 20, additionalProduc

const searchParams = new URLSearchParams();

searchParams.append('ids', additionalProductIds.join(','));
searchParams.append('ids', additionalProductIds.sort().join(','));
searchParams.append('locale', locale);

const additionalProductsUrl = `/api/products/ids?${searchParams.toString()}`;
Expand Down