Skip to content

Commit

Permalink
vk
Browse files Browse the repository at this point in the history
  • Loading branch information
Ko71k committed Dec 16, 2024
1 parent 7a5495a commit 0e96b0c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions public/src/components/EventContentPage/EventContentPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,16 @@ export class EventContentPage {
});
eventActions.appendChild(inviteButton);

// Добавляем кнопку "Поделиться ВКонтакте"
const shareButton = document.createElement('button');
shareButton.className = 'buttonShare';
shareButton.textContent = 'Поделиться ВКонтакте';
shareButton.addEventListener("click", () => {
const shareUrl = `https://vk.com/share.php?url=${encodeURIComponent(window.location.href)}`;
window.open(shareUrl, '_blank');
});
eventActions.appendChild(shareButton);

if (event.author == possession) {
eventActions.appendChild(editButton);
eventActions.appendChild(deleteButton);
Expand Down

0 comments on commit 0e96b0c

Please sign in to comment.