Skip to content

Commit

Permalink
console cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
TetiZ committed Feb 1, 2024
1 parent fbcfc3a commit 79100b1
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions src/js/exersises.js
Original file line number Diff line number Diff line change
Expand Up @@ -792,12 +792,13 @@ function addPaginationBtns() {
}
}

pagesCounter.addEventListener('click', async e => {
const buttonId = e.target.id;
favList.innerHTML = savedCards
.slice(buttonId, buttonId + 8)
.map(
({ bodyPart, name, target, burnedCalories, _id }, index) => `
if (pagesCounter) {
pagesCounter.addEventListener('click', async e => {
const buttonId = e.target.id;
favList.innerHTML = savedCards
.slice(buttonId, buttonId + 8)
.map(
({ bodyPart, name, target, burnedCalories, _id }, index) => `
<li class="exercise-parts">
<div class="part-container">
<div class="exercise-head-container">
Expand Down Expand Up @@ -840,10 +841,13 @@ pagesCounter.addEventListener('click', async e => {
</div>
</li>
`
)
.join('');
updateTrashButtonListeners();
});
)
.join('');
updateTrashButtonListeners();
});
} else {
console.error('Елемент pagesCounter не знайдено.');
}

const favModal = document.querySelector('.favorite-modal');
function favPopUp(data) {
Expand Down

0 comments on commit 79100b1

Please sign in to comment.