<commit_before>import React from 'react';
import { Link } from 'react-router';
import { Card, Header, Image, Icon } from 'semantic-ui-react';
import convertDistance from '../../../helpers/convertDistance';


const ListingInfoCard = ({ card }) => {
  if (card) {
    let picturePath;
    if (card.pictures[0]) {
      picturePath = card.pictures[0].img_path
    } else {
      picturePath = 'http://www.itdesignhouse.com/wp-content/themes/TechNews/images/img_not_available.png'
    }
    return (
      <Link to={`listings/${card.id}`}>
      <Card.Group className="ui center aligned grid" style={{marginTop: '2px'}}>
          <Card fluid style={{marginTop: '2px'}}>
            <Card.Content header={card.title} />
            <Card.Content style={{height: '160px'}}>
              <Image floated='left' size='small' src={picturePath} /> <Card.Content description={card.body} />
            </Card.Content>
            <Card.Content style={{height: '40px'}}>
              {card.distanceFromCenter && (<Card.Content description={`${convertDistance(card.distanceFromCenter)} miles away`} />)}
            </Card.Content>
          </Card>
      </Card.Group>
      </Link>
    )
  } else {
    return (<div></div>)
  }
};

export default ListingInfoCard;

// to={`listings/${card.id}`}

// http://127.0.0.1:3000/listings/9
// http://127.0.0.1:3000/listings/9<commit_msg>fix / bug in all listings<commit_after>import React from 'react';
import { Link } from 'react-router';
import { Card, Header, Image, Icon } from 'semantic-ui-react';
import convertDistance from '../../../helpers/convertDistance';


const ListingInfoCard = ({ card }) => {
  if (card) {
    let picturePath;
    if (card.pictures[0]) {
      picturePath = card.pictures[0].img_path
    } else {
      picturePath = 'http://www.itdesignhouse.com/wp-content/themes/TechNews/images/img_not_available.png'
    }
    return (
      <Link to={`/listings/${card.id}`}>
      <Card.Group className="ui center aligned grid" style={{marginTop: '2px'}}>
          <Card fluid style={{marginTop: '2px'}}>
            <Card.Content header={card.title} />
            <Card.Content style={{height: '160px'}}>
              <Image floated='left' size='small' src={picturePath} /> <Card.Content description={card.body} />
            </Card.Content>
            <Card.Content style={{height: '40px'}}>
              {card.distanceFromCenter && (<Card.Content description={`${convertDistance(card.distanceFromCenter)} miles away`} />)}
            </Card.Content>
          </Card>
      </Card.Group>
      </Link>
    )
  } else {
    return (<div></div>)
  }
};

export default ListingInfoCard;

// to={`listings/${card.id}`}

// http://127.0.0.1:3000/listings/9
// http://127.0.0.1:3000/listings/9
{'fraction_non_alphanumeric': 0.18307301126044315, 'fraction_numerical': 0.022520886305848167, 'mean_word_length': 2.7216216216216216, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 37, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 4, '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': '3876374', 'n_tokens_mistral': 910, 'n_tokens_neox': 886, 'n_words': 163}