sr-npm 1.7.258 → 1.7.259

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sr-npm",
3
- "version": "1.7.258",
3
+ "version": "1.7.259",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/pages/homePage.js CHANGED
@@ -2,7 +2,6 @@ const {
2
2
  debounce,
3
3
  getFilter,
4
4
  } = require('../public/filterUtils');
5
- const { filterBrokenMarkers } = require('../public/utils');
6
5
  const { handleOnLocationClick } = require('../public/mapUtils');
7
6
  const { location } = require('@wix/site-location');
8
7
  let thisObjectVar;
@@ -25,15 +24,18 @@ async function homePageOnReady(_$w,thisObject) {
25
24
  _$w('#citiesDataset').onReady(async () => {
26
25
  const numOfItems = await _$w('#citiesDataset').getTotalCount();
27
26
  const items = await _$w('#citiesDataset').getItems(0, numOfItems);
28
- const markers=filterBrokenMarkers(items.items).map(item => {
27
+ let baseUrl = await location.baseUrl();
28
+ const markers = filterBrokenMarkers(items.items).map(item => {
29
29
  const location = item.locationAddress.location;
30
+ const cityName = encodeURIComponent(item.title); // Use the city name from the item
31
+ const cityLinkUrl = `${baseUrl}/positions?location=${cityName}`; // Add city as search parameter
30
32
  return {
31
33
  location: {
32
34
  latitude: location.latitude,
33
35
  longitude: location.longitude
34
36
  },
35
- address: item.locationAddress.formatted,
36
- title: item.title,
37
+ address: item.locationAddress.formatted,
38
+ title: item.title,
37
39
  link: cityLinkUrl,
38
40
  linkTitle:`View ${item.count} Open Positions`
39
41
  };