Skip to content

Commit

Permalink
exercises update
Browse files Browse the repository at this point in the history
  • Loading branch information
TetiZ committed Feb 1, 2024
1 parent 06566e8 commit 8110ced
Showing 1 changed file with 11 additions and 21 deletions.
32 changes: 11 additions & 21 deletions src/js/exersises.js
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@ function dataToStorage(data) {
async function closeWithBackDrop(event) {
if (
event.target.classList.contains('pop-ex-close-btn') ||
event.key === 'Escape'
event.key === 'Escape'
) {
await popUp(data);
modal.innerHTML = '';
Expand Down Expand Up @@ -669,10 +669,12 @@ function renderCardsFromStorage(e) {
if (savedCards.length != 0) {
emptyContainer.classList.add('visually-hidden');
}
favList.innerHTML = savedCards
.slice(0, 8)
.map(
({ bodyPart, name, target, burnedCalories, _id }, index) => `

if (favList) {
favList.innerHTML = savedCards
.slice(0, 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 @@ -715,8 +717,10 @@ function renderCardsFromStorage(e) {
</div>
</li>
`
)
.join('');
)
.join('');
}

updateTrashButtonListeners();
}

Expand Down Expand Up @@ -755,20 +759,6 @@ favBtns.forEach(favBtn => {
});
});


// <img
// class="dumbbell-favorites-img"
// srcset="
// ../img/favorites/dumbbell-tab-desc.png?raw=true 116w,
// ../img/favorites/[email protected]?raw=true 231w,
// ../img/favorites/dumbbell-mob.png?raw=true 85w,
// ../img/favorites/[email protected]?raw=true 170w
// "
// src="../img/favorites/dumbbell-mob.png?raw=true"
// sizes="(min-width: 768px) 116px, (max-width: 767px) 85px"
// alt="dumbbell icon"
// />;

function emptyContent() {
favList.innerHTML = `
<div class="empty-content-fav">
Expand Down

0 comments on commit 8110ced

Please sign in to comment.