From 92b613ca481acf01c15a5c937fdda6e2e3b89cba Mon Sep 17 00:00:00 2001 From: Hiago Lucas Cardeal de Melo Silva Date: Fri, 29 Nov 2024 09:59:24 -0300 Subject: [PATCH] add sponsoredCount-prop --- CHANGELOG.md | 6 ++++++ react/SearchContext.jsx | 11 +++-------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 558ef00b..9fb051b0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +### Removed +- `sponsoredProductsBehavior` prop which is deprecated + +### Added +- `sponsoredCount` prop + ## [2.137.3] - 2024-10-08 ### Changed diff --git a/react/SearchContext.jsx b/react/SearchContext.jsx index f0ff66b1..8159392e 100644 --- a/react/SearchContext.jsx +++ b/react/SearchContext.jsx @@ -26,7 +26,6 @@ const SearchContext = ({ installmentCriteria, excludedPaymentSystems, includedPaymentSystems, - sponsoredProductsBehavior = 'sync', query: { order: orderBy = orderByField || SORT_OPTIONS[0].value, page: pageQuery, @@ -39,6 +38,7 @@ const SearchContext = ({ searchState, }, children, + sponsoredCount, __unstableProductOriginVtex, }) => { const { @@ -120,8 +120,8 @@ const SearchContext = ({ operator={operator} fuzzy={fuzzy} searchState={state} + sponsoredCount={sponsoredCount} __unstableProductOriginVtex={__unstableProductOriginVtex} - sponsoredProductsBehavior={sponsoredProductsBehavior} > {(searchQuery, extraParams) => { return React.cloneElement(children, { @@ -200,8 +200,8 @@ SearchContext.propTypes = { installmentCriteria: PropTypes.string, excludedPaymentSystems: PropTypes.string, includedPaymentSystems: PropTypes.string, + sponsoredCount: PropTypes.number, __unstableProductOriginVtex: PropTypes.bool, - sponsoredProductsBehavior: PropTypes.string, } SearchContext.schema = { @@ -232,11 +232,6 @@ SearchContext.schema = { type: 'boolean', default: false, }, - sponsoredProductsBehavior: { - title: 'Sponsored products behavior', - type: 'string', - default: 'sync', - }, }, }