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

21 lines
426 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() {
console.log(this.bridgeElement.getStamp())
this.send("connect", this.bridgeElement.getStamp())
}
}