mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 07:49:52 +03:00
formatting
This commit is contained in:
@@ -7,15 +7,16 @@ import { FormLoader } from 'components';
|
||||
import { useI18nContext } from 'i18n/i18n-react';
|
||||
|
||||
const RESTART_TIMEOUT = 2 * 60 * 1000;
|
||||
const POLL_INTERVAL = 3000;
|
||||
const POLL_INTERVAL = 1000;
|
||||
|
||||
const RestartMonitor = () => {
|
||||
const [failed, setFailed] = useState<boolean>(false);
|
||||
const [timeoutId, setTimeoutId] = useState<NodeJS.Timeout>();
|
||||
const { LL } = useI18nContext();
|
||||
const { send } = useRequest(SystemApi.readSystemStatus);
|
||||
const timeoutAt = useRef(new Date().getTime() + RESTART_TIMEOUT);
|
||||
|
||||
const { send } = useRequest(SystemApi.readSystemStatus);
|
||||
|
||||
const poll = useRef(async () => {
|
||||
try {
|
||||
await send();
|
||||
|
||||
Reference in New Issue
Block a user