client/src/components/GroupForm.js
changeset 134 be36eed5e6e0
parent 132 906a6c7c7943
equal deleted inserted replaced
133:6f3078f7fd47 134:be36eed5e6e0
     2 import { connect } from 'react-redux';
     2 import { connect } from 'react-redux';
     3 import { bindActionCreators } from 'redux';
     3 import { bindActionCreators } from 'redux';
     4 import { FormGroup, FormControl, Button, InputGroup, HelpBlock, Glyphicon } from 'react-bootstrap';
     4 import { FormGroup, FormControl, Button, InputGroup, HelpBlock, Glyphicon } from 'react-bootstrap';
     5 import * as authActions from '../actions/authActions';
     5 import * as authActions from '../actions/authActions';
     6 import * as sessionsActions from '../actions/sessionsActions';
     6 import * as sessionsActions from '../actions/sessionsActions';
       
     7 import { getOnline, getCreateGroup } from '../selectors/authSelectors';
     7 
     8 
     8 class GroupForm extends Component {
     9 class GroupForm extends Component {
     9 
    10 
    10   state = {
    11   state = {
    11     createGroup: false,
    12     createGroup: false,
    89 }
    90 }
    90 
    91 
    91 function mapStateToProps(state, props) {
    92 function mapStateToProps(state, props) {
    92 
    93 
    93   return {
    94   return {
    94     createGroup: state.get('createGroup'),
    95     createGroup: getCreateGroup(state),
    95     online: state.getIn(['status', 'online']),
    96     online: getOnline(state),
    96   };
    97   };
    97 }
    98 }
    98 
    99 
    99 function mapDispatchToProps(dispatch) {
   100 function mapDispatchToProps(dispatch) {
   100   return {
   101   return {