Enhance competitor data fetching by ensuring JSON response and improving data handling in the frontend; refactor variable names for consistency

This commit is contained in:
vista-man
2025-03-26 13:51:59 +01:00
parent 54df59d3a8
commit 7d9ce536fc
5 changed files with 375 additions and 37 deletions

View File

@@ -1,12 +1,12 @@
const inputElement = document.querySelector("#search-input");
const search_icon = document.querySelector("#search-close-icon");
const sort_wrapper = document.querySelector(".sort-wrapper");
const searchIcon = document.querySelector("#search-close-icon");
const sortWrapper = document.querySelector(".sort-wrapper");
inputElement.addEventListener("input", () => {
handleInputChange(inputElement);
});
search_icon.addEventListener("click", handleSearchCloseOnClick);
sort_wrapper.addEventListener("click", handleSortIconOnClick);
searchIcon.addEventListener("click", handleSearchCloseOnClick);
sortWrapper.addEventListener("click", handleSortIconOnClick);
function handleInputChange(inputElement) {
const inputValue = inputElement.value;