<commit_before>import React, { PropTypes } from 'react';
import { connect } from 'react-redux';
import { actions as hacksActions } from '../../redux/modules/hacks';
import classes from './HacksView.scss';
import ReactDOM from 'react-dom';
import ReactCSSTransitionGroup from 'react-addons-css-transition-group';

import {Button, Card, Content, Header, Column, Image, Reveal, Segment, Icon} from 'react-semantify';

type
Props = {
  hack: Object
};

export class HackCardComponent extends React.Component {

  static propTypes = {
    hack: PropTypes.object.isRequired
  };

  componentWillMount() {
    this.getData();
  }

  getData() {
    this.setState({
    });
  }

  render() {
    var hack = this.props.hack;
    return (
      <Column key={hack._id}>
        <Card className="fluid">
          <div className={hack.nominated === true ? "extra content" : "hide-it"}>
            <span className="left floated">
              {hack.nominated === true ? "Nominated" : ""}
            </span>
            <i className="float-right minus circle icon"
               className={hack.nominated !== true ? 'float-right minus circle icon' : 'float-right red trophy icon'}>
            </i>
          </div>
          <a href={ '#/hacks/' + hack._id}>
            <Reveal className="fade">
              <Content className="hidden">
                <Image type="link" src={'user-images/' + hack.pictureURL}  className={classes['brighter']}/>
              </Content>
              <Content className="visible">
                <Image src={'user-images/' + hack.pictureURL} className="" />
              </Content>
            </Reveal>
          </a>

          <Content>
            <a href={ '#/hacks/' + hack._id}>
              <Header className="word-wrap">{hack.title}</Header>
            </a>
            <div className="meta">
              <span className="time word-wrap">{hack.shortDescription}</span>
            </div>
          </Content>
          <div className={hack.completed === true ? "extra content" : "hide-it"}>
            <span className="left floated">
              {hack.completed === true ? "Completed" : "Uncompleted"}
            </span>
            <i className="float-right minus circle icon"
               className={hack.completed !== true ? 'float-right minus circle icon' : 'float-right green checkmark icon'}>
            </i>
          </div>
        </Card>
      </Column>
    );
  }
}

const mapStateToProps = (state) => {
  return {
  }
};

export default connect(mapStateToProps, hacksActions)(HackCardComponent);<commit_msg>Shows location in the hacks summary view - moves completed flag at the top of each card<commit_after>import React, { PropTypes } from 'react';
import { connect } from 'react-redux';
import { actions as hacksActions } from '../../redux/modules/hacks';
import classes from './HacksView.scss';
import ReactDOM from 'react-dom';
import ReactCSSTransitionGroup from 'react-addons-css-transition-group';

import {Button, Card, Content, Header, Column, Image, Reveal, Segment, Icon} from 'react-semantify';

type
Props = {
  hack: Object
};

export class HackCardComponent extends React.Component {

  static propTypes = {
    hack: PropTypes.object.isRequired
  };

  componentWillMount() {
    this.getData();
  }

  getData() {
    this.setState({
    });
  }

  render() {
    var hack = this.props.hack;
    return (
      <Column key={hack._id}>
        <Card className="fluid">
          <div className={hack.nominated === true ? "extra content" : "hide-it"}>
            <div className="left floated">
             Nominated
            </div>
            <i className="float-right red trophy icon">
            </i>
          </div>
          <div className={hack.completed === true ? "extra content" : "hide-it"}>
            <span className="left floated">
              Completed
            </span>
            <i className="float-right green checkmark icon">
            </i>
          </div>

          <a href={ '#/hacks/' + hack._id}>
            <Reveal className="fade">
              <Content className="hidden">
                <Image type="link" src={'user-images/' + hack.pictureURL}  className={classes['brighter']}/>
              </Content>
              <Content className="visible">
                <Image src={'user-images/' + hack.pictureURL} className="" />
              </Content>
            </Reveal>
          </a>

          <Content>
            <a href={ '#/hacks/' + hack._id}>
              <Header className="word-wrap">{hack.title}</Header>
            </a>
            <div className="meta">
              <span className="time word-wrap">{hack.shortDescription}</span>
            </div>
          </Content>
          <div className="extra content">
            <i className="marker icon"></i>
            {hack.location ? hack.location : 'Unknown location' }
          </div>
        </Card>
      </Column>
    );
  }
}

const mapStateToProps = (state) => {
  return {
  }
};

export default connect(mapStateToProps, hacksActions)(HackCardComponent);
{'fraction_non_alphanumeric': 0.1484189723320158, 'fraction_numerical': 0.0, 'mean_word_length': 2.1049079754601228, 'pattern_counts': {'":': 0, '<': 79, '<?xml version=': 0, '>': 81, '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': '2876513', 'n_tokens_mistral': 1451, 'n_tokens_neox': 1426, 'n_words': 348}