Skip to content

Commit 714badb

Browse files
committed
remove read toggle
1 parent 4476c43 commit 714badb

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

debugging/book-library/script.js

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -66,17 +66,8 @@ function render() {
6666
row.insertCell(1).textContent = book.author;
6767
row.insertCell(2).textContent = book.pages;
6868

69-
// Read/unread button
70-
const wasReadCell = row.insertCell(3);
71-
const readToggleButton = document.createElement("button");
72-
readToggleButton.className = "btn btn-success";
73-
readToggleButton.textContent = book.check ? "Yes" : "No";
74-
wasReadCell.appendChild(readToggleButton);
75-
76-
readToggleButton.addEventListener("click", () => {
77-
myLibrary[i].check = !myLibrary[i].check;
78-
render();
79-
});
69+
// Read column (static)
70+
row.insertCell(3).textContent = book.check ? "Yes" : "No";
8071

8172
// Delete button
8273
const deleteCell = row.insertCell(4);

0 commit comments

Comments
 (0)