Sha256: d35b7b591f26b17fe6d7ee6d23c301f31ca4be99782b8af71ce8434b7e209613
Contents?: true
Size: 725 Bytes
Versions: 12
Compression:
Stored size: 725 Bytes
Contents
import ApplicationController from "signum/controllers/application_controller" export default class extends ApplicationController { static targets = [] static values = { signalId: String, signalState: String, } connect() { const niE = new CustomEvent("nd-item-activity", { bubbles: true, detail: "added", }) window.dispatchEvent(niE) if (this.signalStateValue == "broadcasted") { fetch("/signal/show", { method: "POST", headers: { "Content-Type": "application/json", }, body: JSON.stringify({ id: this.signalIdValue }), }) .then((res) => {}) .catch((err) => { console.log(err) }) } } }
Version data entries
12 entries across 12 versions & 1 rubygems