Spike events system

This commit is contained in:
Jose Farias
2024-10-11 20:14:09 -05:00
parent 9e2ca7ad4b
commit ec7fc75054
46 changed files with 436 additions and 146 deletions
@@ -0,0 +1,14 @@
import { Controller } from "@hotwired/stimulus"
import { current } from "helpers"
export default class extends Controller {
static classes = [ "myComment" ]
connect() {
this.#myComments.forEach(comment => comment.classList.add(this.myCommentClass))
}
get #myComments() {
return this.element.querySelectorAll(`.comment[data-creator-id='${current.user.id}']`)
}
}