Skip to content

Commit

Permalink
Done.
Browse files Browse the repository at this point in the history
  • Loading branch information
MisterGetman committed Jun 30, 2024
1 parent 50c500f commit aebe11d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,24 +36,24 @@ function queryParams(keyWord) {
return params.toString();
}

function handleFormSubmit(e) {
async function handleFormSubmit(e) {
e.preventDefault();
loader.classList.toggle('hidden');
page = 1;
keyWord = form.keyWord.value.trim();
form.keyWord.value = '';
gallery.innerHTML = '';

loadAndRenderPics();
await loadAndRenderPics();

loader.classList.toggle('hidden');
}

function handleLoadButtonClick(e) {
async function handleLoadButtonClick(e) {
loader.classList.toggle('hidden');
page++;

loadAndRenderMorePics();
await loadAndRenderMorePics();

loader.classList.toggle('hidden');
}
Expand Down

0 comments on commit aebe11d

Please sign in to comment.