Skip to content

Commit

Permalink
[FIX] Iframe auth Login Button (#2241)
Browse files Browse the repository at this point in the history
Co-authored-by: Diego Mello <[email protected]>
  • Loading branch information
djorkaeffalexandre and diegolmello authored Jul 3, 2020
1 parent 6abfbf6 commit c1f3f89
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/selectors/login.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@ 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],
user => user
);

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
);

0 comments on commit c1f3f89

Please sign in to comment.