Fix code after merge

This commit is contained in:
Vladislav Makhov 2020-10-08 10:14:38 +03:00
parent b24bc1f05a
commit 716a9f387e
2 changed files with 9 additions and 11 deletions

View File

@ -80,8 +80,7 @@ import {
loopTreeFolders, loopTreeFolders,
getFilesList, getFilesList,
isMediaOrImage, isMediaOrImage,
getMediaViewerFormats, getMediaViewerFormats
selectFavoritesDirectoryId
} from "../../../../../store/files/selectors"; } from "../../../../../store/files/selectors";
import { SharingPanel, OperationsPanel } from "../../../../panels"; import { SharingPanel, OperationsPanel } from "../../../../panels";
const { isAdmin } = store.auth.selectors; const { isAdmin } = store.auth.selectors;
@ -1588,7 +1587,7 @@ const mapStateToProps = (state) => {
const myFolderIndex = 0; const myFolderIndex = 0;
const shareFolderIndex = 1; const shareFolderIndex = 1;
const commonFolderIndex = 2; const commonFolderIndex = 2;
const favoritesNodeId = selectFavoritesDirectoryId(state); //const favoritesNodeId = selectFavoritesDirectoryId(state);
const myDocumentsId = const myDocumentsId =
treeFolders.length && treeFolders.length &&

View File

@ -1,7 +1,6 @@
import { find, filter } from "lodash"; import { find, filter } from "lodash";
import { constants, store } from "asc-web-common"; import { constants, store } from "asc-web-common";
import { createSelector } from "reselect"; import { createSelector } from "reselect";
import { createSelector } from 'reselect';
const { FileType, FilterType, FolderType } = constants; const { FileType, FilterType, FolderType } = constants;
const { isAdmin } = store.auth.selectors; const { isAdmin } = store.auth.selectors;
@ -611,19 +610,19 @@ export const getSelectedFolderType = (state) => {
return "Share"; return "Share";
} else if (checkFolderType(id, indexOfCommon, treeFolders)) { } else if (checkFolderType(id, indexOfCommon, treeFolders)) {
return "Common"; return "Common";
} else if (checkFolderType(id, indexOfCommon, treeFolders)) { } else if (checkFolderType(id, indexOfFavorites, treeFolders)) {
return "Fevorites"; return "Favorites";
} else if (checkFolderType(id, indexOfTrash, treeFolders)) { } else if (checkFolderType(id, indexOfTrash, treeFolders)) {
return "Trash"; return "Trash";
} }
}; };
const selectAllDirectories = state => state.files.treeFolders // const selectAllDirectories = state => state.files.treeFolders
export const selectFavoritesDirectoryId = createSelector( // export const selectFavoritesDirectoryId = createSelector(
selectAllDirectories, // selectAllDirectories,
allDirectories => allDirectories.find(dir => dir.key === "0-3").id // allDirectories => allDirectories.find(dir => dir.key === "0-3").id
) // )
export const getFileAction = (state) => { export const getFileAction = (state) => {
return state.files.fileAction; return state.files.fileAction;