Skip to content

Commit

Permalink
message
Browse files Browse the repository at this point in the history
  • Loading branch information
Irina-anat committed May 2, 2023
1 parent a6171f4 commit 6654650
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,18 +75,16 @@ async function onPagination(entries, observer) {
gallery.insertAdjacentHTML('beforeend', createMarcup(data.hits))
observer.observe(guard)

console.log(data.hits)
console.log(data.totalHits)
console.log(data.hits.length)
console.log(totalPages)
if (data.hits.length === 0 || totalPages === data.totalHits ) {
if (totalPages >= data.totalHits ) {
Notify.failure("We're sorry, but you've reached the end of search results.")
}
const lightbox = new SimpleLightbox('.gallery a', {
captionsData: 'alt',
captionDelay: 250,
}).refresh();
}
}
})
}
catch {
Expand Down

0 comments on commit 6654650

Please sign in to comment.