sr-npm 1.7.258 → 1.7.260

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