Web:Client: disable close dialog for create and edit room while reuqest is running

This commit is contained in:
TimofeyBoyko 2022-10-26 12:37:43 +05:00
parent f15e708979
commit 5921cf1e1c
2 changed files with 10 additions and 1 deletions

View File

@ -88,6 +88,8 @@ const CreateRoomDialog = ({
};
const onCloseAndDisconnectThirdparty = async () => {
if (isLoading) return;
if (!!roomParams.storageLocation.thirdpartyAccount) {
setIsLoading(true);
await deleteThirdParty(
@ -148,6 +150,7 @@ const CreateRoomDialog = ({
label={t("Common:CancelButton")}
size="normal"
scale
isDisabled={isLoading}
onClick={onCloseAndDisconnectThirdparty}
/>
</ModalDialog.Footer>

View File

@ -44,12 +44,18 @@ const EditRoomDialog = ({
});
}, [fetchedImage]);
const onCloseAction = () => {
if (isLoading) return;
onClose && onClose();
};
return (
<ModalDialog
displayType="aside"
withBodyScroll
visible={visible}
onClose={onClose}
onClose={onCloseAction}
isScrollLocked={isScrollLocked}
withFooterBorder
>