Skip to content

Commit

Permalink
+update
Browse files Browse the repository at this point in the history
  • Loading branch information
Irina-anat committed May 4, 2023
1 parent a17cb72 commit 250a513
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
8 changes: 7 additions & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,15 @@
<div class="container gallery">
<!-- Картки зображень -->
</div>
<div class="js-guard" id="slider"></div>
<div class="js-guard"></div>
<!-- <button type="button" class="load-more">Load more</button> -->
</main>
<script src="index.js" type="module"></script>
</body>
</html>






3 changes: 1 addition & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,7 @@ function resetCurretPage() {
};

function resetSlider() {
const slider = document.getElementById('slider');
window.scrollTo(0, slider.offsetTop);
window.scrollTo(0, guard.offsetTop);
};


Expand Down
1 change: 0 additions & 1 deletion src/js/getImages.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ async function getImages(searchQuery, page = 1) {
safesearch: true,
per_page: 40,
})
const URL = `${BASE_URL}?${params}`
const images = await axios.get(`${BASE_URL}?${params}&page=${page}`);
console.log(images.data)
return images.data;
Expand Down

0 comments on commit 250a513

Please sign in to comment.