Skip to content
Snippets Groups Projects
Select Git revision
  • e851a5324f61a6fc7ad63bf336ec907da69a2cea
  • master default protected
  • eole-amon-ecole-2.8
  • 24-badpathinpostinstall
4 results

clear_dhcp.sh

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