Merge pull request #261 from ONLYOFFICE/bugfix/restore-progress

Web: Fixed progress.
This commit is contained in:
Alexey Safronov 2024-02-14 14:54:19 +04:00 committed by GitHub
commit ba95ddf326
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -145,13 +145,6 @@ const PreparationPortal = (props) => {
returnToPortal();
}
} catch (error) {
const status = err?.response?.status;
const needCreationTableTime = status === 404;
if (needCreationTableTime) {
return;
}
clearAllIntervals();
setErrorMessage(error);
}
@ -194,13 +187,21 @@ const PreparationPortal = (props) => {
setPercent(progress);
} catch (err) {
const status = err?.response?.status;
const needCreationTableTime = status === 404;
if (needCreationTableTime) {
getRecoveryProgress();
return;
}
setErrorMessage(errorMessage(err));
}
};
useEffect(() => {
setTimeout(() => {
getRecoveryProgress();
}, 4000);
}, 6000);
return () => {
clearAllIntervals();