mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 00:09:51 +03:00
update #6
This commit is contained in:
@@ -69,7 +69,7 @@ const DashboardDevices: FC = () => {
|
||||
immediate: true
|
||||
});
|
||||
|
||||
const { data: deviceData, send: readDeviceData } = useRequest((data) => EMSESP.readDeviceData(data), {
|
||||
const { data: deviceData, send: readDeviceData } = useRequest((id) => EMSESP.readDeviceData(id), {
|
||||
initialData: {
|
||||
data: []
|
||||
},
|
||||
@@ -444,7 +444,7 @@ const DashboardDevices: FC = () => {
|
||||
};
|
||||
|
||||
const renderDeviceData = () => {
|
||||
if (!selectedDevice || deviceData.data === undefined) {
|
||||
if (!selectedDevice) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user