fix: mqtt

Deskripsi:
- hapus package mqtt

No Issues
This commit is contained in:
amel
2024-09-26 16:25:34 +08:00
parent 18f9ad9c80
commit dced0ad749
7 changed files with 6 additions and 298 deletions

View File

@@ -1,9 +0,0 @@
import mtqq from 'mqtt'
declare global {
var mtqq_client: mtqq.MqttClient
}
const mtqq_client = globalThis.mtqq_client ?? mtqq.connect("wss://io.wibudev.com")
export default mtqq_client

View File

@@ -1,18 +0,0 @@
'use client'
import { useEffect } from "react"
import mtqq_client from "./mqtt_client"
export default function MqttLoad() {
useEffect(() => {
mtqq_client.on("connect", () => {
mtqq_client.subscribe("app_SDM")
})
mtqq_client.on("message", (topic, message) => {
const data = JSON.parse(message.toString())
})
}, [])
return <>
</>
}