<commit_before>/**
 * Card in the CardList component
 */

import React, { Component, PropTypes } from 'react';
import { Link } from 'react-router';
import Rating from './Rating';


export default class Card extends Component {

  static propTypes = {
    title: PropTypes.string.isRequired,
    image: PropTypes.string,
    id: PropTypes.string,
    genres: PropTypes.array,
    rating: PropTypes.oneOfType([
      PropTypes.number,
      PropTypes.string
    ]),
    type: PropTypes.string.isRequired
  };

  shouldComponentUpdate() {
    return false;
  }

  render() {
    const placeholder =
      '../../images/posterholder.png';

    const divStyle = {
      backgroundImage: `url(${this.props.image !== 'N/A' ? this.props.image : placeholder})`
    };

    return (
      <div className="Card">
        <Link to={`/item/${this.props.type}/${this.props.id}`}>
          <div className="Card--overlay-container fade-in" style={divStyle}>
            <div className="Card--overlay" />
          </div>
        </Link>
        <div>
          <Link className="Card--title" to={`/item/${this.props.type}/${this.props.id}`}>
            {this.props.title}
          </Link>
        </div>
        <div>
          {this.props.rating !== 'n/a' ?
            <Rating rating={this.props.rating} />
            :
            null
          }<commit_msg>Fade in effect for the complete card not the overlay only<commit_after>/**
 * Card in the CardList component
 */

import React, { Component, PropTypes } from 'react';
import { Link } from 'react-router';
import Rating from './Rating';


export default class Card extends Component {

  static propTypes = {
    title: PropTypes.string.isRequired,
    image: PropTypes.string,
    id: PropTypes.string,
    genres: PropTypes.array,
    rating: PropTypes.oneOfType([
      PropTypes.number,
      PropTypes.string
    ]),
    type: PropTypes.string.isRequired
  };

  shouldComponentUpdate() {
    return false;
  }

  render() {
    const placeholder =
      '../../images/posterholder.png';

    const divStyle = {
      backgroundImage: `url(${this.props.image !== 'N/A' ? this.props.image : placeholder})`
    };

    return (
      <div className="Card fade-in">
        <Link to={`/item/${this.props.type}/${this.props.id}`}>
          <div className="Card--overlay-container" style={divStyle}>
            <div className="Card--overlay" />
          </div>
        </Link>
        <div>
          <Link className="Card--title" to={`/item/${this.props.type}/${this.props.id}`}>
            {this.props.title}
          </Link>
        </div>
        <div>
          {this.props.rating !== 'n/a' ?
            <Rating rating={this.props.rating} />
            :
            null
          }
{'fraction_non_alphanumeric': 0.15536105032822758, 'fraction_numerical': 0.0, 'mean_word_length': 2.1492537313432836, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 27, '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': '4009627', 'n_tokens_mistral': 809, 'n_tokens_neox': 816, 'n_words': 174}