abmp-npm 1.1.42 → 1.1.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/package.json +1 -1
- package/pages/Home.js +2 -2
- package/public/Utils/homePage.js +10 -3
package/package.json
CHANGED
package/pages/Home.js
CHANGED
|
@@ -283,7 +283,7 @@ const homePageOnReady = async ({
|
|
|
283
283
|
logMessage(`[setFilterFromParams][${renderingEnv}] params`, JSON.stringify(params));
|
|
284
284
|
console.log('params inside setFilterFromParams ', params);
|
|
285
285
|
const paramsMapping = getParamsMapping(filter, pagination);
|
|
286
|
-
|
|
286
|
+
for (const [param, { setValue, setUI }] of Object.entries(paramsMapping)) {
|
|
287
287
|
const value = params[param];
|
|
288
288
|
if (value !== undefined && value !== null && value !== '') {
|
|
289
289
|
try {
|
|
@@ -307,7 +307,7 @@ const homePageOnReady = async ({
|
|
|
307
307
|
console.error(`Error setting parameter ${param}:`, error);
|
|
308
308
|
}
|
|
309
309
|
}
|
|
310
|
-
}
|
|
310
|
+
}
|
|
311
311
|
};
|
|
312
312
|
await setFilterFromParams(true);
|
|
313
313
|
if (isDefaultStateParams) {
|
package/public/Utils/homePage.js
CHANGED
|
@@ -368,8 +368,8 @@ const createHomepageUtils = (_$w, filterProfiles, logMessage) => {
|
|
|
368
368
|
location = await wixWindow.getCurrentGeolocation();
|
|
369
369
|
|
|
370
370
|
console.log('location inside getAndSetUserLocation', location);
|
|
371
|
-
const userLat = location
|
|
372
|
-
const userLong = location
|
|
371
|
+
const userLat = location?.coords?.latitude ?? 0;
|
|
372
|
+
const userLong = location?.coords?.longitude ?? 0;
|
|
373
373
|
filter = {
|
|
374
374
|
...filter,
|
|
375
375
|
postalcode: isSearchingNearby ? null : filter.postalcode,
|
|
@@ -536,6 +536,13 @@ const createHomepageUtils = (_$w, filterProfiles, logMessage) => {
|
|
|
536
536
|
`[parseAndValidateQueryParams][${renderingEnv}] isNoParams`,
|
|
537
537
|
JSON.stringify(params)
|
|
538
538
|
);
|
|
539
|
+
// search({
|
|
540
|
+
// filter,
|
|
541
|
+
// pagination,
|
|
542
|
+
// debounceTimeout: 0,
|
|
543
|
+
// timeoutType: 'search',
|
|
544
|
+
// isSearchingNearby: false,
|
|
545
|
+
// });
|
|
539
546
|
// Don't search yet - let the caller decide what to do
|
|
540
547
|
// The search will be handled in applyFilterToUI
|
|
541
548
|
return { isDefaultStateParams: true, filter: newFilter };
|
|
@@ -708,7 +715,7 @@ const createHomepageUtils = (_$w, filterProfiles, logMessage) => {
|
|
|
708
715
|
}
|
|
709
716
|
}
|
|
710
717
|
logMessage(
|
|
711
|
-
`[runSearchAndUpdateUI][${renderingEnv}]
|
|
718
|
+
`[runSearchAndUpdateUI][${renderingEnv}] isSearchingNearby is true , filter`,
|
|
712
719
|
JSON.stringify({ filter })
|
|
713
720
|
);
|
|
714
721
|
//Don't run setTimeout on SSR
|