master
Adam Undus 2020-10-14 10:14:01 -04:00
parent dda626b29c
commit e61f6f4ca2
2 changed files with 2 additions and 2 deletions

View File

@ -15,7 +15,7 @@ const displayUsingApi = false;
}) })
} }
function makeListItem(book) { function makeListItem (book) {
const a = `<a href="${book.url}"><h3>${book.title}</h3></a>` const a = `<a href="${book.url}"><h3>${book.title}</h3></a>`
const li = `<li><div class="list-item"><img src="${book.imgSrc}"/>${a}<span>Author: ${book.author}</span><div></li>` const li = `<li><div class="list-item"><img src="${book.imgSrc}"/>${a}<span>Author: ${book.author}</span><div></li>`
console.log(li) console.log(li)

View File

@ -46,7 +46,7 @@
console.log(localStorage.getItem('booklist')) console.log(localStorage.getItem('booklist'))
}) })
function removeBook() { function removeBook () {
const newlist = JSON.parse(localStorage.getItem('booklist')) const newlist = JSON.parse(localStorage.getItem('booklist'))
delete newlist[bookId] delete newlist[bookId]
localStorage.setItem('booklist', JSON.stringify(newlist)) localStorage.setItem('booklist', JSON.stringify(newlist))