homeflowjs 1.0.1 → 1.0.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.
@@ -149,7 +149,10 @@ export const loadNext = () => (dispatch, getState) => {
|
|
149
149
|
let newProperties = [...getState().properties.properties];
|
150
150
|
const nextPageSearch = { ...getState().search.initialSearch };
|
151
151
|
const currentPageNumber = getState()?.properties?.pagination?.current_page;
|
152
|
+
|
153
|
+
if (nextPageSearch?.place?.place_id) nextPageSearch.placeId = nextPageSearch?.place?.place_id;
|
152
154
|
nextPageSearch.page = currentPageNumber ? currentPageNumber + 1 : 2;
|
155
|
+
|
153
156
|
// conduct search ljson
|
154
157
|
return fetch(`/search.ljson?${buildQueryString(nextPageSearch)}`)
|
155
158
|
.then((response) => response.json())
|
@@ -47,6 +47,11 @@ export const removeTag = (payload) => ({
|
|
47
47
|
payload,
|
48
48
|
});
|
49
49
|
|
50
|
+
export const removeAllTags = (payload) => ({
|
51
|
+
type: SearchActionTypes.REMOVE_ALL_TAGS,
|
52
|
+
payload,
|
53
|
+
});
|
54
|
+
|
50
55
|
export const setPlace = (payload) => ({
|
51
56
|
type: SearchActionTypes.SET_PLACE,
|
52
57
|
payload,
|
package/actions/search.types.js
CHANGED
package/package.json
CHANGED
@@ -89,6 +89,15 @@ const searchReducer = (state = INITIAL_STATE, action) => {
|
|
89
89
|
},
|
90
90
|
};
|
91
91
|
}
|
92
|
+
case SearchActionTypes.REMOVE_ALL_TAGS: {
|
93
|
+
return {
|
94
|
+
...state,
|
95
|
+
currentSearch: {
|
96
|
+
...state.currentSearch,
|
97
|
+
tags: [],
|
98
|
+
},
|
99
|
+
};
|
100
|
+
}
|
92
101
|
case SearchActionTypes.TOGGLE_TAG:
|
93
102
|
const tag = action.payload;
|
94
103
|
const newTags = state.currentSearch.tags ? [...state.currentSearch.tags] : [];
|