use js for cabin event ping

This commit is contained in:
John Bowdre 2024-06-24 20:56:55 -05:00
parent f2feafa49b
commit 751eb9b03c
2 changed files with 2 additions and 1 deletions

View file

@ -6,6 +6,7 @@ document.addEventListener('DOMContentLoaded', () => {
const emojiSpan = kudosButton.querySelector('.emoji'); const emojiSpan = kudosButton.querySelector('.emoji');
kudosButton.addEventListener('click', () => { kudosButton.addEventListener('click', () => {
cabin.event('kudos')
kudosButton.disabled = true; kudosButton.disabled = true;
kudosButton.classList.add('clicked'); kudosButton.classList.add('clicked');

View file

@ -42,7 +42,7 @@
{{- if eq $reply true }} {{- if eq $reply true }}
<hr> <hr>
<div class="kudos-container"> <div class="kudos-container">
<button class="kudos-button" data-cabin-event="kudos"> <button class="kudos-button">
<span class="emoji">👍</span> <span class="emoji">👍</span>
</button> </button>
<span class="kudos-text">Enjoyed this?</span> <span class="kudos-text">Enjoyed this?</span>