@abcagency/hc-ui-components 1.7.4 → 1.7.5
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/dist/components/HireControlMap.js +2 -1
- package/dist/components/HireControlMap.js.map +1 -1
- package/dist/components/containers/accordions/map-accordion-item-container.js +3 -1
- package/dist/components/containers/accordions/map-accordion-item-container.js.map +1 -1
- package/dist/components/containers/filter/commute-container.js +11 -3
- package/dist/components/containers/filter/commute-container.js.map +1 -1
- package/dist/components/containers/maps/map-container.js +2 -0
- package/dist/components/containers/maps/map-container.js.map +1 -1
- package/dist/components/containers/maps/map-list-container.js +34 -3
- package/dist/components/containers/maps/map-list-container.js.map +1 -1
- package/dist/components/modules/filter/commute.js +3 -1
- package/dist/components/modules/filter/commute.js.map +1 -1
- package/dist/components/modules/filter/index.js +1 -0
- package/dist/components/modules/filter/index.js.map +1 -1
- package/dist/components/modules/filter/item.js +1 -0
- package/dist/components/modules/filter/item.js.map +1 -1
- package/dist/components/modules/list/list-item/list-item.js +85 -14
- package/dist/components/modules/list/list-item/list-item.js.map +1 -1
- package/dist/contexts/mapListContext.js +7 -1
- package/dist/contexts/mapListContext.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/node_modules/@algolia/requester-node-http/dist/requester.http.js +82 -0
- package/dist/node_modules/@algolia/requester-node-http/dist/requester.http.js.map +1 -0
- package/dist/node_modules/algoliasearch/dist/lite/builds/node.js +269 -0
- package/dist/node_modules/algoliasearch/dist/lite/builds/node.js.map +1 -0
- package/package.json +4 -1
- package/src/components/HireControlMap.js +0 -2
- package/src/components/containers/accordions/map-accordion-item-container.js +3 -1
- package/src/components/containers/filter/commute-container.js +11 -3
- package/src/components/containers/maps/map-container.js +2 -0
- package/src/components/containers/maps/map-list-container.js +30 -3
- package/src/components/modules/filter/commute.js +7 -5
- package/src/components/modules/filter/index.js +2 -0
- package/src/components/modules/filter/item.js +1 -0
- package/src/components/modules/list/list-item/list-item.jsx +97 -24
- package/src/contexts/mapListContext.tsx +5 -1
|
@@ -252,10 +252,13 @@ export const MapListProvider: React.FC<MapListProviderProps> = ({
|
|
|
252
252
|
|
|
253
253
|
useEffect(() => {
|
|
254
254
|
if (!sortSetting) return;
|
|
255
|
-
|
|
255
|
+
if (typeof window !== 'undefined') {
|
|
256
|
+
localStorage.setItem(localStorageKey + 'sortSetting', JSON.stringify(sortSetting));
|
|
257
|
+
}
|
|
256
258
|
}, [sortSetting, localStorageKey]);
|
|
257
259
|
|
|
258
260
|
useEffect(() => {
|
|
261
|
+
if (typeof window === 'undefined') return;
|
|
259
262
|
const loadedFavorites = JSON.parse(localStorage.getItem(localStorageKey + 'favorites') || '[]');
|
|
260
263
|
setFavorites(loadedFavorites);
|
|
261
264
|
}, [localStorageKey]);
|
|
@@ -451,6 +454,7 @@ export const MapListProvider: React.FC<MapListProviderProps> = ({
|
|
|
451
454
|
}
|
|
452
455
|
|
|
453
456
|
const handleSettingFavorites = (newFavorites: number[] | null) => {
|
|
457
|
+
if (typeof window === 'undefined') return;
|
|
454
458
|
if (newFavorites == null) {
|
|
455
459
|
localStorage.removeItem(localStorageKey + 'favorites');
|
|
456
460
|
} else {
|