homeflowjs 1.0.43 → 1.0.44
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/app/user-history.js
CHANGED
@@ -91,7 +91,7 @@ export const updateLastSearchOnPropertyCardClick = (propertyID, remove = false)
|
|
91
91
|
|
92
92
|
const newSearchHistory = searchHistory.map((search, index) => {
|
93
93
|
if (index === 0) {
|
94
|
-
if (remove && search?.clickedProperty && propertyID === search?.clickedProperty) {
|
94
|
+
if (remove && search?.clickedProperty && +propertyID === +search?.clickedProperty) {
|
95
95
|
const { clickedProperty, ...rest } = search;
|
96
96
|
/**
|
97
97
|
* Remove clickedProperty from last search on back to search
|
package/package.json
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import React, { useEffect, useRef, useMemo } from 'react';
|
1
|
+
import React, { useEffect, useRef, useMemo, Children } from 'react';
|
2
2
|
import { connect, useSelector } from 'react-redux';
|
3
3
|
import PropTypes from 'prop-types';
|
4
4
|
import { propertiesByPage, updatePageInURL } from '../property-utils/property-utils';
|
@@ -93,7 +93,13 @@ const PropertiesDisplay = ({
|
|
93
93
|
}
|
94
94
|
return {};
|
95
95
|
}, [properties]);
|
96
|
-
|
96
|
+
|
97
|
+
const handleListElementClick = (id = null) => {
|
98
|
+
if (id) visitPropertyUpdate(id);
|
99
|
+
|
100
|
+
return true;
|
101
|
+
}
|
102
|
+
|
97
103
|
const items = propertiesByPage(properties, propertiesPagination).map((page, i) => (
|
98
104
|
<ConditionalWrapper
|
99
105
|
key={i}
|
@@ -101,9 +107,16 @@ const PropertiesDisplay = ({
|
|
101
107
|
wrapper={(children) => (
|
102
108
|
<div
|
103
109
|
data-result-page={page[0].resultPage}
|
110
|
+
data-page-marker={page[0].resultPage}
|
104
111
|
className={`results-page results-page--${displayType}`}
|
105
112
|
>
|
106
|
-
{children
|
113
|
+
{Children.map(children, child =>
|
114
|
+
<div
|
115
|
+
onClick={() => handleListElementClick(child?.key)}
|
116
|
+
>
|
117
|
+
{child}
|
118
|
+
</div>
|
119
|
+
)}
|
107
120
|
</div>
|
108
121
|
)}
|
109
122
|
>
|