homeflowjs 0.7.13 → 0.7.14

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.
@@ -27,7 +27,7 @@ const initCookieConsent = () => {
27
27
  });
28
28
  }
29
29
 
30
- fetch('ajax-events/logs', {
30
+ fetch('/ajax-events/logs', {
31
31
  method: 'POST',
32
32
  body: JSON.stringify({ 'cookie-consent': status }),
33
33
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "homeflowjs",
3
- "version": "0.7.13",
3
+ "version": "0.7.14",
4
4
  "description": "JavaScript toolkit for Homeflow themes",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -24,21 +24,17 @@ const PropertiesGrid = ({ properties, GridItem, infiniteScroll }) => {
24
24
  );
25
25
  }
26
26
 
27
- const items = propertiesByPage(properties).map((page) => (
28
- <div
29
- data-result-page={page[0].resultPage}
30
- key={uniqueKey()}
31
- className="clearfix results-page--grid"
32
- >
33
- {page.map((property) => (
34
- <GridItem key={property.property_id} property={property} />
35
- ))}
36
- </div>
37
- ));
27
+ const items = propertiesByPage(properties).map((page) =>
28
+ page.map((property) => (
29
+ <GridItem key={property.property_id} property={property} />
30
+ )
31
+ )).flat();
38
32
 
39
33
  return (
40
34
  <div className="hf-property-results hf-property-results__list">
41
- {items}
35
+ <div className="clearfix results-page--grid">
36
+ {items}
37
+ </div>
42
38
  </div>
43
39
  );
44
40
  };
@@ -20,7 +20,7 @@ const SortOrderSelect = (props) => {
20
20
 
21
21
  if (reactSelect) {
22
22
  const handleChange = ({ value }) => {
23
- const newSearch = { ...search, page: null };
23
+ const newSearch = { ...search };
24
24
  newSearch.sorted = value;
25
25
 
26
26
  propertySearch(newSearch);
@@ -49,7 +49,7 @@ const SortOrderSelect = (props) => {
49
49
  }
50
50
 
51
51
  const handleChange = (e) => {
52
- const newSearch = { ...search, page: null };
52
+ const newSearch = { ...search };
53
53
  newSearch.sorted = e.target.value;
54
54
 
55
55
  propertySearch(newSearch);