homeflowjs 0.11.2 → 0.11.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "homeflowjs",
3
- "version": "0.11.2",
3
+ "version": "0.11.3",
4
4
  "description": "JavaScript toolkit for Homeflow themes",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -14,6 +14,7 @@ const PropertiesDisplay = ({
14
14
  displayType,
15
15
  infiniteScroll,
16
16
  inserts,
17
+ noResultsMessage,
17
18
  ...other
18
19
  }) => {
19
20
  const onScroll = () => {
@@ -49,9 +50,7 @@ const PropertiesDisplay = ({
49
50
  }, [properties]);
50
51
 
51
52
  if (!properties.length) {
52
- return (
53
- <p>There were no properties matching your search.</p>
54
- );
53
+ return noResultsMessage;
55
54
  }
56
55
 
57
56
  const addWrapper = displayType === 'list';
@@ -107,10 +106,12 @@ PropertiesDisplay.propTypes = {
107
106
  displayType: PropTypes.string.isRequired,
108
107
  infiniteScroll: PropTypes.bool.isRequired,
109
108
  inserts: PropTypes.array,
109
+ noResultsMessage: PropTypes.node,
110
110
  };
111
111
 
112
112
  PropertiesDisplay.defaultProps = {
113
113
  inserts: null,
114
+ noResultsMessage: <p>There were no properties matching your search.</p>,
114
115
  };
115
116
 
116
117
  const mapStateToProps = (state) => ({
@@ -26,6 +26,7 @@ const PropertyResults = ({
26
26
  infiniteScroll,
27
27
  noMap,
28
28
  inserts,
29
+ noResultsMessage,
29
30
  ...other
30
31
  }) => (
31
32
  <Router>
@@ -36,6 +37,7 @@ const PropertyResults = ({
36
37
  displayType="list"
37
38
  infiniteScroll={infiniteScroll}
38
39
  inserts={inserts}
40
+ noResultsMessage={noResultsMessage}
39
41
  {...other}
40
42
  />
41
43
  </Route>
@@ -46,6 +48,7 @@ const PropertyResults = ({
46
48
  displayType="grid"
47
49
  infiniteScroll={infiniteScroll}
48
50
  inserts={inserts}
51
+ noResultsMessage={noResultsMessage}
49
52
  {...other}
50
53
  />
51
54
  </Route>
@@ -57,6 +60,7 @@ const PropertyResults = ({
57
60
  displayType="map"
58
61
  infiniteScroll={infiniteScroll}
59
62
  inserts={inserts}
63
+ noResultsMessage={noResultsMessage}
60
64
  {...other}
61
65
  />
62
66
  ) : (
@@ -71,6 +75,7 @@ const PropertyResults = ({
71
75
  displayType="grid"
72
76
  infiniteScroll={infiniteScroll}
73
77
  inserts={inserts}
78
+ noResultsMessage={noResultsMessage}
74
79
  {...other}
75
80
  />
76
81
  </Route>
@@ -81,6 +86,7 @@ const PropertyResults = ({
81
86
  displayType="list"
82
87
  infiniteScroll={infiniteScroll}
83
88
  inserts={inserts}
89
+ noResultsMessage={noResultsMessage}
84
90
  {...other}
85
91
  />
86
92
  </Route>