Skip to content

Commit

Permalink
search but no marks
Browse files Browse the repository at this point in the history
  • Loading branch information
Ko71k committed Nov 25, 2024
1 parent d78a0a2 commit fd6c095
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions public/components/Search/Search.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ export class Search {
},
credentials: 'include',
};
let path = '/events/search?';
let path = '/events?';
if (searchTerm) {
path += 'query=' + searchTerm;
}
Expand All @@ -140,6 +140,7 @@ export class Search {
path += '&tags=' + tag;
})
}
path += 'topLeftLatitude=55.627815653778434&topLeftLongitude=36.634768827416046&botRightLatitude=55.93737159143388&botRightLongitude=38.48184524343166';
const response = await api.get(path, request);

if (response.ok) {
Expand Down Expand Up @@ -248,7 +249,7 @@ export class Search {
},
credentials: 'include',
};
let path = '/events/search?';
let path = '/events?';
const searchTerm = document.getElementById('searchQuery').value;
const searchTags = document.getElementById('searchTags').value;
const tags = searchTags ? searchTags.split(' ') : []; // Split tags by space
Expand Down Expand Up @@ -297,7 +298,8 @@ export class Search {
Longitude >= document.getElementById("topLeftLongitude").value &&
Longitude <= document.getElementById("botRightLongitude").value) {
feedContent.appendChild(feedElement);
}
};

const placemark = new ymaps.Placemark(coordinates, {
hintContent: title // Устанавливаем всплывающее содержимое
}, {
Expand Down Expand Up @@ -375,8 +377,7 @@ export class Search {
const botRightLatitude = bottomRight[0]; // Широта правого нижнего угла
const botRightLongitude = bottomRight[1]; // Долгота правого нижнего угла

if (window.location.pathname == `/search?q=`) {
// if (true) {
if (window.location.pathname == `/search`) {
document.getElementById("topLeftLatitude").value = topLeftLatitude;
document.getElementById("topLeftLongitude").value = topLeftLongitude;
document.getElementById("botRightLatitude").value = botRightLatitude;
Expand Down

0 comments on commit fd6c095

Please sign in to comment.