sr-npm 1.7.184 → 1.7.186

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/pages/homePage.js +6 -15
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sr-npm",
3
- "version": "1.7.184",
3
+ "version": "1.7.186",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/pages/homePage.js CHANGED
@@ -29,30 +29,21 @@ async function homePageOnReady(_$w,thisObject) {
29
29
  console.log("items#@#@$$#@#$$$#######");
30
30
  const markers = items.items.map(item => {
31
31
  const location = item.locationAddress.location;
32
- const cityName = encodeURIComponent(item.title);
32
+ const cityName = encodeURIComponent(item.title); // Use the city name from the item
33
+ const cityLinkUrl = `${linkUrl}?keyWord=${cityName}`; // Add city as search parameter
33
34
  return {
34
35
  location: {
35
36
  latitude: location.latitude,
36
37
  longitude: location.longitude
37
38
  },
38
- address: item.locationAddress.formatted,
39
- description: `View ${item.count} Open Positions in ${item.title}`,
40
- title: item.title,
41
- cityName: item.title, // Store city name for click handler
42
- _id: item._id
39
+ address: item.locationAddress.formatted,
40
+ description: `View ${item.count} Open Positions`,
41
+ title: item.title, // Show the actual city name in title
42
+ linkUrl: cityLinkUrl
43
43
  };
44
44
  });
45
45
  //@ts-ignore
46
46
  _$w('#googleMaps').setMarkers(markers);
47
-
48
- // Add click handler for map markers
49
- _$w('#googleMaps').onMarkerClick((event) => {
50
- const marker = event.marker;
51
- if (marker.cityName) {
52
- const cityName = encodeURIComponent(marker.cityName);
53
- location.to(`/positions?keyWord=${cityName}`);
54
- }
55
- });
56
47
  });
57
48
  }
58
49