From 1ccff1c801a2d8a0a1420bbf7bdb4e93dbae9827 Mon Sep 17 00:00:00 2001 From: Iryna Rozmaita Date: Sun, 7 May 2023 13:03:36 +0300 Subject: [PATCH] update js --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 22274c5..8db63c6 100755 --- a/src/index.js +++ b/src/index.js @@ -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.");