ordering-components-external 13.1.9 → 13.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_bundles/{7.ordering-component.9450050bf4eab3324098.js → 7.ordering-component.777ac76c92b69a69c827.js} +1 -1
- package/_bundles/{ordering-component.9450050bf4eab3324098.js → ordering-component.777ac76c92b69a69c827.js} +2 -2
- package/_modules/components/BusinessAndProductList/index.js +5 -1
- package/package.json +1 -1
- package/src/components/BusinessAndProductList/index.js +3 -1
- /package/_bundles/{0.ordering-component.9450050bf4eab3324098.js → 0.ordering-component.777ac76c92b69a69c827.js} +0 -0
- /package/_bundles/{1.ordering-component.9450050bf4eab3324098.js → 1.ordering-component.777ac76c92b69a69c827.js} +0 -0
- /package/_bundles/{2.ordering-component.9450050bf4eab3324098.js → 2.ordering-component.777ac76c92b69a69c827.js} +0 -0
- /package/_bundles/{4.ordering-component.9450050bf4eab3324098.js → 4.ordering-component.777ac76c92b69a69c827.js} +0 -0
- /package/_bundles/{5.ordering-component.9450050bf4eab3324098.js → 5.ordering-component.777ac76c92b69a69c827.js} +0 -0
- /package/_bundles/{6.ordering-component.9450050bf4eab3324098.js → 6.ordering-component.777ac76c92b69a69c827.js} +0 -0
- /package/_bundles/{7.ordering-component.9450050bf4eab3324098.js.LICENSE.txt → 7.ordering-component.777ac76c92b69a69c827.js.LICENSE.txt} +0 -0
- /package/_bundles/{8.ordering-component.9450050bf4eab3324098.js → 8.ordering-component.777ac76c92b69a69c827.js} +0 -0
- /package/_bundles/{ordering-component.9450050bf4eab3324098.js.LICENSE.txt → ordering-component.777ac76c92b69a69c827.js.LICENSE.txt} +0 -0
|
@@ -680,7 +680,11 @@ var BusinessAndProductList = exports.BusinessAndProductList = function BusinessA
|
|
|
680
680
|
totalPages: categorySelected.id === 'featured' ? featuredRes === null || featuredRes === void 0 || (_featuredRes$content12 = featuredRes.content) === null || _featuredRes$content12 === void 0 || (_featuredRes$content12 = _featuredRes$content12.pagination) === null || _featuredRes$content12 === void 0 ? void 0 : _featuredRes$content12.total_pages : pagination === null || pagination === void 0 ? void 0 : pagination.total_pages
|
|
681
681
|
}),
|
|
682
682
|
loading: false,
|
|
683
|
-
products: categorySelected.id === 'featured' ? productsListFeatured : searchValue ? [].concat(_toConsumableArray(productsListFeatured), _toConsumableArray(productsList))
|
|
683
|
+
products: categorySelected.id === 'featured' ? productsListFeatured : searchValue ? [].concat(_toConsumableArray(productsListFeatured), _toConsumableArray(productsList)).filter(function (product, i, _hash) {
|
|
684
|
+
return _hash.findIndex(function (_product) {
|
|
685
|
+
return (_product === null || _product === void 0 ? void 0 : _product.id) === (product === null || product === void 0 ? void 0 : product.id);
|
|
686
|
+
}) === i;
|
|
687
|
+
}) : [].concat(_toConsumableArray(productsListFeatured), _toConsumableArray(curCategoryState.products.concat(productsList)))
|
|
684
688
|
};
|
|
685
689
|
categoriesState[categoryKey] = _newcategoryState;
|
|
686
690
|
setCategoryState(_objectSpread({}, _newcategoryState));
|
package/package.json
CHANGED
|
@@ -516,7 +516,9 @@ export const BusinessAndProductList = (props) => {
|
|
|
516
516
|
loading: false,
|
|
517
517
|
products: categorySelected.id === 'featured'
|
|
518
518
|
? productsListFeatured
|
|
519
|
-
: searchValue
|
|
519
|
+
: searchValue
|
|
520
|
+
? [...productsListFeatured, ...productsList].filter((product, i, _hash) => _hash.findIndex(_product => _product?.id === product?.id) === i)
|
|
521
|
+
: [...productsListFeatured, ...curCategoryState.products.concat(productsList)]
|
|
520
522
|
}
|
|
521
523
|
|
|
522
524
|
categoriesState[categoryKey] = newcategoryState
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|