Skip to content
Snippets Groups Projects
Select Git revision
  • 18e1b5881ab4d3351ede025bbff0b6e19f5a1d15
  • master default protected
  • 133-fail2ban-page
  • reorganisation
  • 16-maintenace-service
  • 11-fail2ban
  • 6-monit-update
  • 7-dolibarr-fail2ban
  • 6-surveillance-interne-des-serveur
  • test-glpi
  • 2-migrate-to-phpfpm
  • jessie
  • github
13 results

installMySQL.env

Blame
  • AuthenticationLogout.js 1.35 KiB
    import { compose } from 'redux';
    import { connect } from 'react-redux';
    import { withTranslation } from 'react-i18next';
    import { withStyles } from '@material-ui/core';
    import { withPlugins } from '../extend/withPlugins';
    
    import {
      getCurrentCanvas,
      selectAuthStatus,
      selectCanvasAuthService,
      selectLogoutAuthService,
    } from '../state/selectors';
    import * as actions from '../state/actions';
    import { AuthenticationLogout } from '../components/AuthenticationLogout';
    
    /**
     * mapStateToProps - to hook up connect
     * @memberof App
     * @private
     */
    const mapStateToProps = (state, { windowId }) => {
      const canvasId = (getCurrentCanvas(state, { windowId }) || {}).id;
      const service = selectCanvasAuthService(state, { canvasId, windowId });
      const logoutService = selectLogoutAuthService(state, { canvasId, windowId });
      return {
        authServiceId: service && service.id,
        label: logoutService && logoutService.getLabel()[0].value,
        logoutServiceId: logoutService && logoutService.id,
        status: service && selectAuthStatus(state, service),
      };
    };
    
    const mapDispatchToProps = {
      resetAuthenticationState: actions.resetAuthenticationState,
    };
    
    const styles = {};
    
    const enhance = compose(
      connect(mapStateToProps, mapDispatchToProps),
      withStyles(styles),
      withTranslation(),
      withPlugins('AuthenticationLogout'),
    );
    
    export default enhance(AuthenticationLogout);