From 107b87e7ce6f19927126b71b55752fd685af9a28 Mon Sep 17 00:00:00 2001 From: Rassmagin Alexander Date: Mon, 25 Nov 2024 15:24:42 +0300 Subject: [PATCH] should work --- .../components/EventContentPage/EventContentPage.js | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/public/components/EventContentPage/EventContentPage.js b/public/components/EventContentPage/EventContentPage.js index 1eb776b..3a350ca 100644 --- a/public/components/EventContentPage/EventContentPage.js +++ b/public/components/EventContentPage/EventContentPage.js @@ -75,17 +75,11 @@ export class EventContentPage { async _renderEvent(event) { const possession = await this.checkPossession(); const myFavorites = await this.checkFavorites(); - console.log(myFavorites); - console.log(event.id); const mySubsribtions = await this.checkSubscribe(); - console.log(typeof event.id); - console.log(typeof myFavorites); - console.log(typeof mySubsribtions); - const inSub = mySubsribtions.includes(event.id); + let inSub = mySubsribtions.includes(event.id); - const isFavorite = myFavorites.includes(event.id); - console.log(isFavorite); + let isFavorite = myFavorites.includes(event.id); const eventAuthor = document.createElement('div'); eventAuthor.className = 'event__author'; @@ -221,8 +215,6 @@ export class EventContentPage { } else { favoritesAddButton.textContent = 'Добавить в избранные'; }; - - favoritesAddButton.textContent = 'Добавить в избранные'; favoritesAddButton.addEventListener("click", async () => { const request = { headers: {