DebasishDhal99 commited on
Commit
09eff05
·
1 Parent(s): 294e850

Fix "Found pages" in exploration sidebar

Browse files

- As i added the clicked point into the existing result, i was getting one extra count in the "Found # pages" in exploration sidebar.

Files changed (1) hide show
  1. frontend/src/components/Map.js +2 -2
frontend/src/components/Map.js CHANGED
@@ -246,7 +246,7 @@ const Map = ( { onMapClick, searchQuery, contentType, setSearchQuery, setSubmitt
246
  },
247
  ...markers
248
  ]);
249
- console.log(`Found ${markers.length} nearby pages`);
250
  } else {
251
  console.error('Failed to fetch nearby pages');
252
  }
@@ -1049,7 +1049,7 @@ const Map = ( { onMapClick, searchQuery, contentType, setSearchQuery, setSubmitt
1049
  fontSize: '14px',
1050
  color: '#1976d2'
1051
  }}>
1052
- Found {explorationMarkers.length} nearby pages
1053
  </div>
1054
  )}
1055
 
 
246
  },
247
  ...markers
248
  ]);
249
+ console.log(`Found ${markers.length} nearby pages`); // Only backend results.
250
  } else {
251
  console.error('Failed to fetch nearby pages');
252
  }
 
1049
  fontSize: '14px',
1050
  color: '#1976d2'
1051
  }}>
1052
+ Found <span style={{ fontWeight: 'bold' }}>{explorationMarkers.length-1}</span> nearby pages
1053
  </div>
1054
  )}
1055