Fix braking Change from last commit
This commit is contained in:
@@ -362,6 +362,10 @@ export default function DeviceDetail() {
|
|||||||
const [locationName, setLocationName] = useState(null);
|
const [locationName, setLocationName] = useState(null);
|
||||||
const cols = useBreakpoint();
|
const cols = useBreakpoint();
|
||||||
const [deviceUsers, setDeviceUsers] = useState([]);
|
const [deviceUsers, setDeviceUsers] = useState([]);
|
||||||
|
const [staffNotes, setStaffNotes] = useState("");
|
||||||
|
const [editingNotes, setEditingNotes] = useState(false);
|
||||||
|
const [savingNotes, setSavingNotes] = useState(false);
|
||||||
|
const notesRef = useRef(null);
|
||||||
const [usersLoading, setUsersLoading] = useState(false);
|
const [usersLoading, setUsersLoading] = useState(false);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@@ -456,10 +460,10 @@ export default function DeviceDetail() {
|
|||||||
|
|
||||||
// ===== Section definitions =====
|
// ===== Section definitions =====
|
||||||
|
|
||||||
const [staffNotes, setStaffNotes] = useState(device.staffNotes || "");
|
// Initialize staffNotes from device data once loaded
|
||||||
const [editingNotes, setEditingNotes] = useState(false);
|
useEffect(() => {
|
||||||
const [savingNotes, setSavingNotes] = useState(false);
|
if (device?.staffNotes) setStaffNotes(device.staffNotes);
|
||||||
const notesRef = useRef(null);
|
}, [device]);
|
||||||
|
|
||||||
const saveStaffNotes = async (value) => {
|
const saveStaffNotes = async (value) => {
|
||||||
setSavingNotes(true);
|
setSavingNotes(true);
|
||||||
|
|||||||
Reference in New Issue
Block a user