<commit_before>import React from "react";
import Radium from "radium";
import Button from "./Button";
import {isMoreMenuExpanded} from "../redux/selectors";
import {expandMoreMenu, collapseMoreMenu} from '../redux/actionCreators';
import {connect} from 'react-redux';
import {bindActionCreators} from 'redux';
import {styles} from './styles';

export class More extends React.Component {
  render() {
    if (this.props.expanded) {
      return(
        <Button kind="toolbar"
                style={styles.buttons.more.moreButton}
                onClick={()=> this.props.collapse()}>
          More
        </Button>
      );
    }
    return(
      <Button kind="toolbar"
              style={styles.buttons.more.moreButton}
              onClick={()=> this.props.expand()}>
        More
      </Button>
    );
  }
}

More.propTypes = {
  expanded: React.PropTypes.bool,
  expand: React.PropTypes.func,
  collapse: React.PropTypes.func,
};

export default connect(
  state => ({
    expanded: isMoreMenuExpanded(state),
  }),
  dispatch => bindActionCreators( {
    expand: expandMoreMenu,
    collapse: collapseMoreMenu,
  }, dispatch)
)(Radium(More));
<commit_msg>compact More.js render conditional<commit_after>import React from "react";
import Radium from "radium";
import Button from "./Button";
import {isMoreMenuExpanded} from "../redux/selectors";
import {expandMoreMenu, collapseMoreMenu} from '../redux/actionCreators';
import {connect} from 'react-redux';
import {bindActionCreators} from 'redux';
import {styles} from './styles';

export class More extends React.Component {
  render() {
    return(
      <Button kind="toolbar"
              style={styles.buttons.more.moreButton}
              onClick={() =>
                this.props.expanded ? this.props.collapse() : this.props.expand()}>
              More
      </Button>
    );
  }
}


More.propTypes = {
  expanded: React.PropTypes.bool,
  expand: React.PropTypes.func,
  collapse: React.PropTypes.func,
};

export default connect(
  state => ({
    expanded: isMoreMenuExpanded(state),
  }),
  dispatch => bindActionCreators( {
    expand: expandMoreMenu,
    collapse: collapseMoreMenu,
  }, dispatch)
)(Radium(More));

{'fraction_non_alphanumeric': 0.13979963570127504, 'fraction_numerical': 0.0, 'mean_word_length': 3.1296992481203008, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 16, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '624095', 'n_tokens_mistral': 645, 'n_tokens_neox': 648, 'n_words': 151}