42fa37d347
This is so we can dismiss any notifications that arrived for a bubble while we were viewing that bubble. Otherwise, they'll stick around until we leave the page and come back.
15 lines
325 B
JavaScript
15 lines
325 B
JavaScript
import { post } from "@rails/request.js"
|
|
import { Controller } from "@hotwired/stimulus"
|
|
|
|
export default class extends Controller {
|
|
static values = { url: String }
|
|
|
|
connect() {
|
|
post(this.urlValue, { responseKind: "turbo-stream" })
|
|
}
|
|
|
|
disconnect() {
|
|
post(this.urlValue, { responseKind: "turbo-stream" })
|
|
}
|
|
}
|