Simplify Current JS implementation

This commit is contained in:
Jose Farias
2024-10-12 23:06:34 -06:00
parent 2c6c821e20
commit bb5b0701ed
5 changed files with 17 additions and 28 deletions
@@ -1,5 +1,4 @@
import { Controller } from "@hotwired/stimulus"
import { current } from "helpers"
export default class extends Controller {
static classes = [ "myComment" ]
@@ -9,6 +8,6 @@ export default class extends Controller {
}
get #myComments() {
return this.element.querySelectorAll(`.comment[data-creator-id='${current.user.id}']`)
return this.element.querySelectorAll(`.comment[data-creator-id='${Current.user.id}']`)
}
}