Skip to content

Commit 5d5b67e

Browse files
committed
add sponsoredCount-prop
1 parent 5eb8fe7 commit 5d5b67e

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
77

88
## [Unreleased]
99

10+
### Removed
11+
- `sponsoredProductsBehavior` prop which is deprecated
12+
13+
### Added
14+
- `sponsoredCount` prop
15+
1016
## [2.137.3] - 2024-10-08
1117

1218
### Changed

react/SearchContext.jsx

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ const SearchContext = ({
2626
installmentCriteria,
2727
excludedPaymentSystems,
2828
includedPaymentSystems,
29-
sponsoredProductsBehavior = 'sync',
3029
query: {
3130
order: orderBy = orderByField || SORT_OPTIONS[0].value,
3231
page: pageQuery,
@@ -39,6 +38,7 @@ const SearchContext = ({
3938
searchState,
4039
},
4140
children,
41+
sponsoredCount,
4242
__unstableProductOriginVtex,
4343
}) => {
4444
const {
@@ -120,8 +120,8 @@ const SearchContext = ({
120120
operator={operator}
121121
fuzzy={fuzzy}
122122
searchState={state}
123+
sponsoredCount={sponsoredCount}
123124
__unstableProductOriginVtex={__unstableProductOriginVtex}
124-
sponsoredProductsBehavior={sponsoredProductsBehavior}
125125
>
126126
{(searchQuery, extraParams) => {
127127
return React.cloneElement(children, {
@@ -200,8 +200,8 @@ SearchContext.propTypes = {
200200
installmentCriteria: PropTypes.string,
201201
excludedPaymentSystems: PropTypes.string,
202202
includedPaymentSystems: PropTypes.string,
203+
sponsoredCount: PropTypes.number,
203204
__unstableProductOriginVtex: PropTypes.bool,
204-
sponsoredProductsBehavior: PropTypes.string,
205205
}
206206

207207
SearchContext.schema = {
@@ -231,12 +231,7 @@ SearchContext.schema = {
231231
title: 'admin/editor.product-search.hideUnavailableItems',
232232
type: 'boolean',
233233
default: false,
234-
},
235-
sponsoredProductsBehavior: {
236-
title: 'Sponsored products behavior',
237-
type: 'string',
238-
default: 'sync',
239-
},
234+
}
240235
},
241236
}
242237

0 commit comments

Comments
 (0)