mirror of
https://github.com/Alvin-Zilverstand/pokedex.git
synced 2026-03-06 21:29:57 +01:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user