Skip to content

Commit

Permalink
buttons react no refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
Ko71k committed Nov 25, 2024
1 parent 107b87e commit 74ef7ea
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions public/components/EventContentPage/EventContentPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,12 @@ export class EventContentPage {
}
}
inSub = inSub ^ 1;
if (inSub) {
subscribeButton.textContent = 'Отписаться';
}
else {
subscribeButton.textContent = 'Подписаться';
}
});

if (possession > 0){
Expand Down Expand Up @@ -238,6 +244,11 @@ export class EventContentPage {
}
}
isFavorite = isFavorite ^ 1;
if (isFavorite) {
favoritesAddButton.textContent = 'Удалить из избранных';
} else {
favoritesAddButton.textContent = 'Добавить в избранные';
};
});
if (possession > 0) {
eventActions.appendChild(favoritesAddButton);
Expand Down

0 comments on commit 74ef7ea

Please sign in to comment.