Files
fizzy/app/javascript/controllers/bridge/stamp_controller.js
T
2026-03-09 15:43:58 +01:00

20 lines
379 B
JavaScript

import { BridgeComponent } from "@hotwired/hotwire-native-bridge"
export default class extends BridgeComponent {
static component = "stamp"
connect() {
super.connect()
this.notifyBridgeOfConnect()
}
disconnect() {
super.disconnect()
this.send("disconnect")
}
notifyBridgeOfConnect() {
this.send("connect", this.bridgeElement.getStamp())
}
}