Web:Client:Add fetchThirdPartyProviders.

This commit is contained in:
Vlada Gazizova 2022-10-13 19:06:59 +03:00
parent 1a3f0464af
commit b5d960cc05
2 changed files with 15 additions and 2 deletions

View File

@ -12,6 +12,7 @@ const CreateRoomEvent = ({
createTag,
addTagsToRoom,
deleteThirdParty,
fetchThirdPartyProviders,
calculateRoomLogoParams,
uploadRoomLogo,
addLogoToRoom,
@ -102,6 +103,7 @@ const CreateRoomEvent = ({
isLoading={isLoading}
setIsLoading={setIsLoading}
deleteThirdParty={deleteThirdParty}
fetchThirdPartyProviders={fetchThirdPartyProviders}
/>
);
};
@ -130,7 +132,10 @@ export default inject(
const { connectDialogVisible } = dialogsStore;
const { deleteThirdParty } = settingsStore.thirdPartyStore;
const {
deleteThirdParty,
fetchThirdPartyProviders,
} = settingsStore.thirdPartyStore;
return {
createRoom,
@ -139,6 +144,7 @@ export default inject(
fetchTags,
addTagsToRoom,
deleteThirdParty,
fetchThirdPartyProviders,
calculateRoomLogoParams,
uploadRoomLogo,
addLogoToRoom,

View File

@ -38,6 +38,7 @@ const CreateRoomDialog = ({
setIsLoading,
deleteThirdParty,
fetchThirdPartyProviders,
}) => {
const [isScrollLocked, setIsScrollLocked] = useState(false);
const [isOauthWindowOpen, setIsOauthWindowOpen] = useState(false);
@ -91,7 +92,13 @@ const CreateRoomDialog = ({
setIsLoading(true);
await deleteThirdParty(
roomParams.storageLocation.thirdpartyAccount.providerId
).finally(() => setIsLoading(false));
)
.then(async () => {
await fetchThirdPartyProviders();
})
.finally(() => {
setIsLoading(false);
});
}
closeEvent();
};