Second try to the fix
This commit is contained in:
@@ -380,6 +380,7 @@ export default function DeviceDetail() {
|
||||
api.get("/mqtt/status").catch(() => null),
|
||||
]);
|
||||
setDevice(d);
|
||||
if (d.staffNotes) setStaffNotes(d.staffNotes);
|
||||
|
||||
// Match MQTT status by serial number
|
||||
if (mqttData?.devices && d.device_id) {
|
||||
@@ -460,11 +461,6 @@ export default function DeviceDetail() {
|
||||
|
||||
// ===== Section definitions =====
|
||||
|
||||
// Initialize staffNotes from device data once loaded
|
||||
useEffect(() => {
|
||||
if (device?.staffNotes) setStaffNotes(device.staffNotes);
|
||||
}, [device]);
|
||||
|
||||
const saveStaffNotes = async (value) => {
|
||||
setSavingNotes(true);
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user