From 3b6883595a3379dee4f573cfa48334c7d34cb04f Mon Sep 17 00:00:00 2001 From: Vladislav Makhov Date: Tue, 27 Oct 2020 14:47:07 +0300 Subject: [PATCH] Move selector to auth --- .../Client/src/components/pages/Home/Section/Body/index.js | 4 ++-- products/ASC.Files/Client/src/store/files/selectors.js | 4 ---- web/ASC.Web.Common/src/store/auth/selectors.js | 5 +++++ 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/products/ASC.Files/Client/src/components/pages/Home/Section/Body/index.js b/products/ASC.Files/Client/src/components/pages/Home/Section/Body/index.js index 91a2bea28a..12a86ac875 100644 --- a/products/ASC.Files/Client/src/components/pages/Home/Section/Body/index.js +++ b/products/ASC.Files/Client/src/components/pages/Home/Section/Body/index.js @@ -88,8 +88,7 @@ import { getMyFolderId, getTooltipLabel, getIsPrivacyFolder, - getPrivacyInstructionsLink, - getOrganizationName + getPrivacyInstructionsLink } from "../../../../../store/files/selectors"; import { SharingPanel, OperationsPanel } from "../../../../panels"; const { @@ -97,6 +96,7 @@ const { getSettings, getCurrentUser, isEncryptionSupport, + getOrganizationName } = store.auth.selectors; //import { getFilterByLocation } from "../../../../../helpers/converters"; //import config from "../../../../../../package.json"; diff --git a/products/ASC.Files/Client/src/store/files/selectors.js b/products/ASC.Files/Client/src/store/files/selectors.js index 869ea17b12..3dc1115ffe 100644 --- a/products/ASC.Files/Client/src/store/files/selectors.js +++ b/products/ASC.Files/Client/src/store/files/selectors.js @@ -985,10 +985,6 @@ export const getPrivacyInstructionsLink = (state) => { return state.files.privacyInstructions; } -export const getOrganizationName = (state) => { - return state.auth.settings.organizationName; -} - export const getHeaderVisible = createSelector( getSelectionLength, getSelected, diff --git a/web/ASC.Web.Common/src/store/auth/selectors.js b/web/ASC.Web.Common/src/store/auth/selectors.js index 7e67cd4bf9..acf594e947 100644 --- a/web/ASC.Web.Common/src/store/auth/selectors.js +++ b/web/ASC.Web.Common/src/store/auth/selectors.js @@ -185,3 +185,8 @@ export const isEncryptionSupport = createSelector([getSettings], (settings) => { const { isEncryptionSupport } = settings; return isEncryptionSupport || false; }); + +export const getOrganizationName = createSelector([getSettings], (settings) => { + const { organizationName } = settings; + return organizationName; +});