Skip to content

Commit

Permalink
update js
Browse files Browse the repository at this point in the history
  • Loading branch information
Irina-anat committed May 7, 2023
1 parent 250a513 commit 1ccff1c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ async function onSearch(evn) {
currentPage += 1;
const data = await getImages(searchQuery, currentPage);
// console.log(data)
let totalPages = Math.ceil(data.totalHits / perPage);
const totalPages = Math.ceil(data.totalHits / perPage);
gallery.insertAdjacentHTML('beforeend', createMarcup(data.hits));
if (totalPages === currentPage) {
Notify.failure("We're sorry, but you've reached the end of search results.");
Expand Down

0 comments on commit 1ccff1c

Please sign in to comment.