text: // @flow weak
  
  import { connect }            from 'react-redux';
  import { bindActionCreators } from 'redux';
  import * as viewsActions      from '../../redux/modules/views';
  import { Protected }          from '../../views';
  
  /* -----------------------------------------
    Redux
   ------------------------------------------*/
  const mapStateToProps = (state) => {
    return {
      currentView:  state.views.currentView
    };
  };
  
  const mapDispatchToProps = (dispatch) => {
    return bindActionCreators(
      {
        enterProtected: viewsActions.enterProtected,
        leaveProtected: viewsActions.leaveProtected
      },
      dispatch
    );
  };
  
  export default connect(
      mapStateToProps,
      mapDispatchToProps
    )(Protected);
  