mirror of
https://gitea.smigz.com/smiggiddy/odin-codeprojects.git
synced 2025-06-28 04:45:36 -04:00
Merge branch 'main' into library
This commit is contained in:
commit
7237bcfd12
1 changed files with 3 additions and 1 deletions
|
@ -90,12 +90,14 @@ submitButton.addEventListener('click', event => {
|
||||||
const title = document.querySelector('#title').value;
|
const title = document.querySelector('#title').value;
|
||||||
const readBtn = document.querySelector('#read-button').checked;
|
const readBtn = document.querySelector('#read-button').checked;
|
||||||
|
|
||||||
|
|
||||||
if (author === "" || title === "") {
|
if (author === "" || title === "") {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// create book object
|
|
||||||
const newBook = new Book(title, author, readBtn);
|
const newBook = new Book(title, author, readBtn);
|
||||||
|
|
||||||
|
|
||||||
addBookToLibrary(newBook);
|
addBookToLibrary(newBook);
|
||||||
displayBooks(myLibrary);
|
displayBooks(myLibrary);
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue