formatting

This commit is contained in:
proddy
2024-08-16 13:48:05 +02:00
parent 1f8c966022
commit d3a7ab8fc1

View File

@@ -7,15 +7,16 @@ import { FormLoader } from 'components';
import { useI18nContext } from 'i18n/i18n-react'; import { useI18nContext } from 'i18n/i18n-react';
const RESTART_TIMEOUT = 2 * 60 * 1000; const RESTART_TIMEOUT = 2 * 60 * 1000;
const POLL_INTERVAL = 3000; const POLL_INTERVAL = 1000;
const RestartMonitor = () => { const RestartMonitor = () => {
const [failed, setFailed] = useState<boolean>(false); const [failed, setFailed] = useState<boolean>(false);
const [timeoutId, setTimeoutId] = useState<NodeJS.Timeout>(); const [timeoutId, setTimeoutId] = useState<NodeJS.Timeout>();
const { LL } = useI18nContext(); const { LL } = useI18nContext();
const { send } = useRequest(SystemApi.readSystemStatus);
const timeoutAt = useRef(new Date().getTime() + RESTART_TIMEOUT); const timeoutAt = useRef(new Date().getTime() + RESTART_TIMEOUT);
const { send } = useRequest(SystemApi.readSystemStatus);
const poll = useRef(async () => { const poll = useRef(async () => {
try { try {
await send(); await send();