Client:Components:EmptyContainer: fix property reading errors for roomsFolder object

This commit is contained in:
Darya Umrikhina 2024-08-29 15:37:16 +04:00
parent facd1a456a
commit 5beb406bfc

View File

@ -132,9 +132,9 @@ export const useOptions = (
newFilter.searchArea = RoomSearchArea.Active;
const state = {
title: roomsFolder.title,
title: roomsFolder?.title,
isRoot: true,
rootFolderType: roomsFolder.rootFolderType,
rootFolderType: roomsFolder?.rootFolderType,
};
const path = getCategoryUrl(CategoryType.Shared);
@ -145,7 +145,7 @@ export const useOptions = (
},
state,
};
}, [roomsFolder.rootFolderType, roomsFolder.title, userId]);
}, [roomsFolder?.rootFolderType, roomsFolder?.title, userId]);
const onGoToPersonal = useCallback((): LinkProps => {
const newFilter = FilesFilter.getDefault();
@ -153,9 +153,9 @@ export const useOptions = (
newFilter.folder = myFolderId?.toString() ?? "";
const state = {
title: myFolder.title,
title: myFolder?.title,
isRoot: true,
rootFolderType: myFolder.rootFolderType,
rootFolderType: myFolder?.rootFolderType,
};
const path = getCategoryUrl(CategoryType.Personal);
@ -169,7 +169,7 @@ export const useOptions = (
},
state,
};
}, [myFolder.rootFolderType, myFolder.title, myFolderId]);
}, [myFolder?.rootFolderType, myFolder?.title, myFolderId]);
const onCreateRoom = useCallback(() => {
if (isWarningRoomsDialog) {