This commit is contained in:
Kenneth Jannette
2024-02-21 22:19:09 -06:00
parent 6ccab42685
commit a1eb2c0e33

View File

@@ -352,17 +352,16 @@ const DocEditPage = () => {
}
}
const flipBusy = () => {
setIsBusy(!isBusy);
};
async function createAndReturnDocx() {
window.scrollTo({ top: 0, behavior: "smooth" });
function stopBusy() {
setIsBusy(false);
}
window.scrollTo({ top: 0 });
setIsBusy(true);
const response = await handleCreateDocx();
if (response.status === 200) {
setTimeout(getDocx, 5000);
setTimeout(flipBusy, 2500);
setTimeout(stopBusy, 2500);
setTimeout(cleanUpDocx, 10000);
} else {
setShowErrorModal(true);