mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-28 03:43:28 +10:00
SearchFilters uses amenities as variable name for amenities
This commit is contained in:
parent
dac4005390
commit
a3aa697d9e
2 changed files with 12 additions and 12 deletions
|
|
@ -26,7 +26,7 @@ const SearchFiltersComponent = props => {
|
|||
resultsCount,
|
||||
searchInProgress,
|
||||
categories,
|
||||
features,
|
||||
amenities,
|
||||
history,
|
||||
intl,
|
||||
} = props;
|
||||
|
|
@ -45,11 +45,11 @@ const SearchFiltersComponent = props => {
|
|||
id: 'SearchFilters.categoryLabel',
|
||||
});
|
||||
|
||||
const featuresLabel = intl.formatMessage({
|
||||
id: 'SearchFilters.featuresLabel',
|
||||
const amenitiesLabel = intl.formatMessage({
|
||||
id: 'SearchFilters.amenitiesLabel',
|
||||
});
|
||||
|
||||
const initialFeatures = !!urlQueryParams[AMENITIES_URL_PARAM]
|
||||
const initialAmenities = !!urlQueryParams[AMENITIES_URL_PARAM]
|
||||
? urlQueryParams[AMENITIES_URL_PARAM].split(',')
|
||||
: [];
|
||||
|
||||
|
|
@ -85,14 +85,14 @@ const SearchFiltersComponent = props => {
|
|||
/>
|
||||
) : null;
|
||||
|
||||
const featuresFilter = features ? (
|
||||
const amenitiesFilter = amenities ? (
|
||||
<SelectMultipleFilter
|
||||
name="amenities"
|
||||
urlParam={AMENITIES_URL_PARAM}
|
||||
label={featuresLabel}
|
||||
label={amenitiesLabel}
|
||||
onSelect={handleSelectOptions}
|
||||
options={features}
|
||||
initialValues={initialFeatures}
|
||||
options={amenities}
|
||||
initialValues={initialAmenities}
|
||||
contentPlacementOffset={FILTER_DROPDOWN_OFFSET}
|
||||
/>
|
||||
) : null;
|
||||
|
|
@ -101,7 +101,7 @@ const SearchFiltersComponent = props => {
|
|||
<div className={classes}>
|
||||
<div className={css.filters}>
|
||||
{categoryFilter}
|
||||
{featuresFilter}
|
||||
{amenitiesFilter}
|
||||
</div>
|
||||
|
||||
<div className={css.searchResultSummary}>
|
||||
|
|
@ -119,7 +119,7 @@ SearchFiltersComponent.defaultProps = {
|
|||
resultsCount: null,
|
||||
searchingInProgress: false,
|
||||
categories: null,
|
||||
features: null,
|
||||
amenities: null,
|
||||
};
|
||||
|
||||
SearchFiltersComponent.propTypes = {
|
||||
|
|
@ -132,7 +132,7 @@ SearchFiltersComponent.propTypes = {
|
|||
onMapIconClick: func.isRequired,
|
||||
onManageDisableScrolling: func.isRequired,
|
||||
categories: array,
|
||||
features: array,
|
||||
amenities: array,
|
||||
|
||||
// from withRouter
|
||||
history: shape({
|
||||
|
|
|
|||
|
|
@ -483,8 +483,8 @@
|
|||
"ReviewModal.description": "Reviews are an important part of the Saunatime community. Please share what went well and what could have been improved.",
|
||||
"ReviewModal.later": "Later",
|
||||
"ReviewModal.title": "Leave a review for {revieweeName}",
|
||||
"SearchFilters.amenitiesLabel": "Amenities",
|
||||
"SearchFilters.categoryLabel": "Category",
|
||||
"SearchFilters.featuresLabel": "Amenities",
|
||||
"SearchFilters.filtersButtonLabel": "Filters",
|
||||
"SearchFilters.foundResults": "{count, number} {count, plural, one {result} other {results}}",
|
||||
"SearchFilters.loadingResults": "Loading search results…",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue