<commit_before>import React from 'react';
var connect = require('react-redux').connect;

function mapStatetoProps (state) {
  return {
    cause: state.NewExperiment.get('cause'),
    effect: state.NewExperiment.get('effect'),
    questionIndex: state.NewExperiment.get('questionIndex')
  };
}

function mapDispatchtoProps (dispatch) {
  return {
    actions: bindActionCreators(NewExperimentActions, dispatch)
  };
}

var HypothesisCheck = React.createClass({

  handleBack: function () {
    this.props.actions.goToPrevQuestion(this.props.questionIndex);
  },

  handleNext: function () {
    this.props.actions.goToNextQuestion(this.props.questionIndex);
  },

  render: function () {
    return (
      <div>
      <section>
        <p>"Let's rephrase your cause and effect here."</p>
        <p>"If this doesn't make sense, try to rephrase your causes and effects."</p>  
        <p>Here is your hypothesis: {this.props.hypothesis}</p>
        <p>Question: How does {this.props.cause} affect {this.props.effect}?</p>
        <button onClick={this.handleBack}>Redo</button>
        <button onClick={this.handleNext}>Makes Sense!</button>
      </section>
      </div>
    );
  }
});

module.exports = connect(mapStatetoProps)(HypothesisCheck);<commit_msg>Fix action dispatcher in HypothesisCheck<commit_after>import React from 'react';
var connect = require('react-redux').connect;

var NewExperimentActions = require('../../actions/NewExperiment');
var bindActionCreators = require('redux').bindActionCreators;

function mapStatetoProps (state) {
  return {
    cause: state.NewExperiment.get('cause'),
    effect: state.NewExperiment.get('effect'),
    questionIndex: state.NewExperiment.get('questionIndex')
  };
}

function mapDispatchtoProps (dispatch) {
  return {
    actions: bindActionCreators(NewExperimentActions, dispatch)
  };
}

var HypothesisCheck = React.createClass({

  handleBack: function () {
    console.log(this.props.actions);
    this.props.actions.goToPrevQuestion(this.props.questionIndex);
  },

  handleNext: function () {
    this.props.actions.goToNextQuestion(this.props.questionIndex);
  },

  render: function () {
    return (
      <div>
      <section>
        <p>"Let's rephrase your cause and effect here."</p>
        <p>"If this doesn't make sense, try to rephrase your causes and effects."</p>  
        <p>Here is your hypothesis: {this.props.hypothesis}</p>
        <p>Question: How does {this.props.cause} affect {this.props.effect}?</p>
        <button onClick={this.handleBack}>Redo</button>
        <button onClick={this.handleNext}>Makes Sense!</button>
      </section>
      </div>
    );
  }
});

module.exports = connect(mapStatetoProps, mapDispatchtoProps)(HypothesisCheck);
{'fraction_non_alphanumeric': 0.14019033674963396, 'fraction_numerical': 0.0, 'mean_word_length': 3.786339754816112, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 35, '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': '3136661', 'n_tokens_mistral': 853, 'n_tokens_neox': 825, 'n_words': 165}