lint
parent
dda626b29c
commit
e61f6f4ca2
|
@ -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)
|
||||||
|
|
|
@ -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))
|
||||||
|
|
Loading…
Reference in New Issue