updated state in CreateRoom

This commit is contained in:
mushka 2022-08-15 15:50:18 +03:00
parent a2ef8d46b5
commit 307be1d4e5

View File

@ -26,6 +26,7 @@ const CreateRoomDialog = ({
onClose,
onCreate,
providers,
fetchedTags,
isLoading,
folderFormValidation,
@ -37,10 +38,18 @@ const CreateRoomDialog = ({
type: undefined,
tags: [],
isPrivate: false,
storageLocation: undefined,
rememberStorageLocation: false,
thirdpartyFolderName: "",
icon: "",
isThirdparty: false,
storageLocation: null,
rememberThirdpartyStorage: false,
icon: {
uploadedFile: null,
tmpFile: "",
x: 0.5,
y: 0.5,
width: 216,
height: 216,
zoom: 1,
},
});
const setRoomTags = (newTags) =>
@ -57,9 +66,7 @@ const CreateRoomDialog = ({
}));
};
const onCreateRoom = () => {
onCreate(roomParams);
};
const onCreateRoom = () => onCreate(roomParams);
const isChooseRoomType = roomParams.type === undefined;
const goBack = () => {
@ -68,9 +75,8 @@ const CreateRoomDialog = ({
type: undefined,
tags: [],
isPrivate: false,
isThirdparty: false,
storageLocation: undefined,
rememberStorageLocation: false,
thirdpartyFolderName: "",
icon: "",
});
};
@ -111,6 +117,7 @@ const CreateRoomDialog = ({
setRoomParams={setRoomParams}
setRoomType={setRoomType}
setIsScrollLocked={setIsScrollLocked}
providers={providers}
/>
)}
</ModalDialog.Body>