Skip to content

Commit

Permalink
Change name of function for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
toduyemi committed Sep 26, 2023
1 parent c124eda commit ec9e8c4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ Book.prototype.createBookCard = function () {
this.editButton.textContent = 'edit';

if (this.reviewed) {
this.addUserReviewButtonToCard();
this.addFullBookCardButtonToCard();
}

return this.bookCardWrapper;
Expand Down Expand Up @@ -173,7 +173,7 @@ Book.prototype.updateEditBook = function () {
this.createBookCard();

if (this.reviewed) {
this.addUserReviewButtonToCard();
this.addFullBookCardButtonToCard();
}

// prevents event listeners from stacking => future calls will change any card already editted
Expand All @@ -188,7 +188,7 @@ Book.prototype.prefillEditBookForm = function () {
document.querySelector(`#editBookForm [value="${this.progress}"]`).checked = true;
}

Book.prototype.addUserReviewButtonToCard = function () {
Book.prototype.addFullBookCardButtonToCard = function () {
if (!this.fullBookCardButton) {
this.fullBookCardButton = document.createElement('button');
this.fullBookCardButton.textContent = "...";
Expand Down

0 comments on commit ec9e8c4

Please sign in to comment.