[FIX] Iframe auth Login Button (#2241)

Co-authored-by: Diego Mello <diegolmello@gmail.com>
This commit is contained in:
Djorkaeff Alexandre 2020-07-03 11:23:33 -03:00 committed by GitHub
parent 6abfbf615f
commit c1f3f89c09
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -9,6 +9,7 @@ const getUser = (state) => {
};
const getLoginServices = state => state.login.services || {};
const getShowFormLoginSetting = state => state.settings.Accounts_ShowFormLogin || false;
const getIframeEnabledSetting = state => state.settings.Accounts_iframe_enabled || false;
export const getUserSelector = createSelector(
[getUser],
@ -16,6 +17,6 @@ export const getUserSelector = createSelector(
);
export const getShowLoginButton = createSelector(
[getLoginServices, getShowFormLoginSetting],
(loginServices, showFormLogin) => showFormLogin || Object.values(loginServices).length
[getLoginServices, getShowFormLoginSetting, getIframeEnabledSetting],
(loginServices, showFormLogin, iframeEnabled) => showFormLogin || Object.values(loginServices).length || iframeEnabled
);