homeflowjs 0.14.0 → 0.14.2

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.
@@ -147,10 +147,10 @@ export const loadNext = () => (dispatch, getState) => {
147
147
  dispatch(setLoading({ properties: true }));
148
148
  // set page on search to page + 1
149
149
  let newProperties = [...getState().properties.properties];
150
- const newSearch = { ...getState().search.currentSearch };
151
- newSearch.page = newSearch.page ? newSearch.page + 1 : 2;
150
+ const nextPageSearch = { ...getState().search.currentSearch };
151
+ nextPageSearch.page = nextPageSearch.page ? nextPageSearch.page + 1 : 2;
152
152
  // conduct search ljson
153
- return fetch(`/search.ljson?${buildQueryString(newSearch)}`)
153
+ return fetch(`/search.ljson?${buildQueryString(nextPageSearch)}`)
154
154
  .then((response) => response.json())
155
155
  .then((json) => {
156
156
  if (json.properties) {
@@ -163,10 +163,10 @@ export const loadNext = () => (dispatch, getState) => {
163
163
  );
164
164
  // add the page number to each new property for dividing properties into per-page divs
165
165
  const addedProperties = json.properties.map((property) => (
166
- { ...property, resultPage: newSearch.page }
166
+ { ...property, resultPage: nextPageSearch.page }
167
167
  ));
168
168
  newProperties = [...newProperties, ...addedProperties];
169
- dispatch(setSearch(newSearch));
169
+ dispatch(setSearch(nextPageSearch));
170
170
  dispatch(setProperties(newProperties));
171
171
  dispatch(setPagination(json.pagination));
172
172
  dispatch(setLoading({ properties: false }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "homeflowjs",
3
- "version": "0.14.0",
3
+ "version": "0.14.2",
4
4
  "sideEffects": [
5
5
  "modal/**/*",
6
6
  "user/default-profile/**/*",