more
This commit is contained in:
@@ -352,17 +352,16 @@ const DocEditPage = () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const flipBusy = () => {
|
|
||||||
setIsBusy(!isBusy);
|
|
||||||
};
|
|
||||||
|
|
||||||
async function createAndReturnDocx() {
|
async function createAndReturnDocx() {
|
||||||
window.scrollTo({ top: 0, behavior: "smooth" });
|
function stopBusy() {
|
||||||
|
setIsBusy(false);
|
||||||
|
}
|
||||||
|
window.scrollTo({ top: 0 });
|
||||||
setIsBusy(true);
|
setIsBusy(true);
|
||||||
const response = await handleCreateDocx();
|
const response = await handleCreateDocx();
|
||||||
if (response.status === 200) {
|
if (response.status === 200) {
|
||||||
setTimeout(getDocx, 5000);
|
setTimeout(getDocx, 5000);
|
||||||
setTimeout(flipBusy, 2500);
|
setTimeout(stopBusy, 2500);
|
||||||
setTimeout(cleanUpDocx, 10000);
|
setTimeout(cleanUpDocx, 10000);
|
||||||
} else {
|
} else {
|
||||||
setShowErrorModal(true);
|
setShowErrorModal(true);
|
||||||
|
|||||||
Reference in New Issue
Block a user