From 74ef7eaa4e00bd64b5cb5431e6f448c7a4219d35 Mon Sep 17 00:00:00 2001 From: Rassmagin Alexander Date: Mon, 25 Nov 2024 15:27:21 +0300 Subject: [PATCH] buttons react no refresh --- .../components/EventContentPage/EventContentPage.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/public/components/EventContentPage/EventContentPage.js b/public/components/EventContentPage/EventContentPage.js index 3a350ca..ee90192 100644 --- a/public/components/EventContentPage/EventContentPage.js +++ b/public/components/EventContentPage/EventContentPage.js @@ -115,6 +115,12 @@ export class EventContentPage { } } inSub = inSub ^ 1; + if (inSub) { + subscribeButton.textContent = 'Отписаться'; + } + else { + subscribeButton.textContent = 'Подписаться'; + } }); if (possession > 0){ @@ -238,6 +244,11 @@ export class EventContentPage { } } isFavorite = isFavorite ^ 1; + if (isFavorite) { + favoritesAddButton.textContent = 'Удалить из избранных'; + } else { + favoritesAddButton.textContent = 'Добавить в избранные'; + }; }); if (possession > 0) { eventActions.appendChild(favoritesAddButton);