mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 07:49:52 +03:00
use await
This commit is contained in:
@@ -63,9 +63,11 @@ const SystemMonitor = () => {
|
|||||||
void send();
|
void send();
|
||||||
}, 1000); // check every second
|
}, 1000); // check every second
|
||||||
|
|
||||||
const onCancel = () => {
|
const onCancel = async () => {
|
||||||
setErrorMessage(undefined);
|
setErrorMessage(undefined);
|
||||||
setSystemStatus(SystemStatusCodes.SYSTEM_STATUS_NORMAL as unknown as string);
|
await setSystemStatus(
|
||||||
|
SystemStatusCodes.SYSTEM_STATUS_NORMAL as unknown as string
|
||||||
|
);
|
||||||
document.location.href = '/';
|
document.location.href = '/';
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -81,7 +83,7 @@ const SystemMonitor = () => {
|
|||||||
>
|
>
|
||||||
{data?.status === SystemStatusCodes.SYSTEM_STATUS_UPLOADING
|
{data?.status === SystemStatusCodes.SYSTEM_STATUS_UPLOADING
|
||||||
? LL.WAIT_FIRMWARE()
|
? LL.WAIT_FIRMWARE()
|
||||||
: data?.status === SystemStatusCodes.SYSTEM_STATUS_RESTARTING
|
: data?.status === SystemStatusCodes.SYSTEM_STATUS_RESTART_REQUESTED
|
||||||
? LL.APPLICATION_RESTARTING()
|
? LL.APPLICATION_RESTARTING()
|
||||||
: data?.status === SystemStatusCodes.SYSTEM_STATUS_NORMAL
|
: data?.status === SystemStatusCodes.SYSTEM_STATUS_NORMAL
|
||||||
? LL.RESTARTING_PRE()
|
? LL.RESTARTING_PRE()
|
||||||
|
|||||||
Reference in New Issue
Block a user