<commit_before>import React, {Component} from 'react';
import {browserHistory, Link} from 'react-router';
import {connect} from 'react-redux';
import {bindActionCreators} from 'redux';
import {fetchUser}  from '../../actions/firebase_actions';
import {Card, CardActions, CardHeader, CardMedia, CardTitle, CardText} from 'material-ui/Card';
import FlatButton from 'material-ui/FlatButton';

class TutorCards extends Component {

  constructor(props) {
    super(props);
    if (this.props.profile.name == "" || !this.props.profile.name) {
      this.props.profile.name = "Anonymous";
    }
    this.props.profileIMG;
    this.props.uid;
  }

  goToTutorProfile() {
    browserHistory.push("/tutor_profile")
  }

  renderSubjects(profile) {
    var subject = [];
    if (profile.tutorInfo.math) { subject.push("Math"); }
    if (profile.tutorInfo.science) { subject.push("Science"); }
    if (profile.tutorInfo.english) { subject.push("English"); }

    var list = [];
    for (var index in subject) {
      var item = (<li>{subject[index]}</li>);
      list.push(item);
    }
    return list;
  }

  renderSubjectsR(profile) {
    var subject = [];
    if (profile.tutorInfo.spanish) { subject.push("Spanish"); }
    if (profile.tutorInfo.history) { subject.push("History"); }

    var list = [];
    for (var index in subject) {
      var item = (<li>{subject[index]}</li>);
      list.push(item);
    }
    return list;
  }

  render() {

    var cardStyle = {
      display: 'inline-table',
      width: '250px',
      height: '275px',
      textAlign: 'center',
      margin: '15px',
    }

    var imgStyle = {
      width: '100px',
      height: '100px',
      borderRadius: '50%',
      marginTop: '20px',
    }

    var cardText = {
      textAlign: 'left',
      marginLeft: '20px',
      padding: '0px',
    }

    var list = {
      float: 'left',
    }

    return (
      <Card style={cardStyle} onClick={this.goToTutorProfile}>
        <img style={imgStyle} src={this.props.profileIMG} alt="Profile Image"/>
        <h3><b>{this.props.profile.name}</b></h3>
        <h5>Cost: {this.props.profile.tutorInfo.payrate} </h5>
        <CardText style={cardText}>
          <ul style={list}>
            {this.renderSubjects(this.props.profile)}
          </ul>
          <ul style={list}>
            {this.renderSubjectsR(this.props.profile)}
          </ul>
        </CardText>
      </Card>
    );
  }
}



function mapDispatchToProps(dispatch) {
  return bindActionCreators({fetchUser}, dispatch);
}
<commit_msg>pre-merge fix<commit_after>import React, {Component} from 'react';
import {browserHistory, Link} from 'react-router';
import {connect} from 'react-redux';
import {bindActionCreators} from 'redux';
import {fetchUser}  from '../../actions/firebase_actions';
import {Card, CardActions, CardHeader, CardMedia, CardTitle, CardText} from 'material-ui/Card';
import FlatButton from 'material-ui/FlatButton';

class TutorCards extends Component {

  constructor(props) {
    super(props);
    if (this.props.profile.name == "" || !this.props.profile.name) {
      this.props.profile.name = "Anonymous";
    }
    this.props.profileIMG;
    this.props.uid;
  }

  goToTutorProfile() {
    browserHistory.push("/tutor_profile")
  }

  renderSubjects(profile) {
    var subject = [];
    if (profile.tutorInfo.math) { subject.push("Math"); }
    if (profile.tutorInfo.science) { subject.push("Science"); }
    if (profile.tutorInfo.english) { subject.push("English"); }

    var list = [];
    for (var index in subject) {
      var item = (<li>{subject[index]}</li>);
      list.push(item);
    }
    return list;
  }

  renderSubjectsR(profile) {
    var subject = [];
    if (profile.tutorInfo.spanish) { subject.push("Spanish"); }
    if (profile.tutorInfo.history) { subject.push("History"); }

    var list = [];
    for (var index in subject) {
      var item = (<li>{subject[index]}</li>);
      list.push(item);
    }
    return list;
  }

  render() {

    var cardStyle = {
      display: 'inline-table',
      width: '250px',
      height: '275px',
      textAlign: 'center',
      margin: '15px',
    }

    var imgStyle = {
      width: '100px',
      height: '100px',
      borderRadius: '50%',
      marginTop: '20px',
    }

    var cardText = {
      textAlign: 'left',
      marginLeft: '20px',
      padding: '0px',
    }

    var list = {
      float: 'left',
    }

    return (
      <Card style={cardStyle} onClick={this.goToTutorProfile}>
        <img style={imgStyle} src={this.props.profileIMG} alt="Profile Image"/>
        <h3><b>{this.props.profile.name}</b></h3>
        <h5>Cost: {this.props.profile.id} </h5>
        <CardText style={cardText}>
          <ul style={list}>
            {this.renderSubjects(this.props.profile)}
          </ul>
          <ul style={list}>
            {this.renderSubjectsR(this.props.profile)}
          </ul>
        </CardText>
      </Card>
    );
  }
}



function mapDispatchToProps(dispatch) {
  return bindActionCreators({fetchUser}, dispatch);
}

{'fraction_non_alphanumeric': 0.1617968594712781, 'fraction_numerical': 0.009938382031405287, 'mean_word_length': 2.7, 'pattern_counts': {'":': 0, '<': 41, '<?xml version=': 0, '>': 41, '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': '2546935', 'n_tokens_mistral': 1714, 'n_tokens_neox': 1632, 'n_words': 325}