<commit_before>/*
 * Retro Game Night
 * Copyright (c) 2015 <NAME>, <NAME>
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.txt file in the root directory of this source tree.
 */
import './Avatar.less'
import React, { PropTypes } from 'react'
import { Link } from 'react-router'

export default class Avatar extends React.Component {
  render() {
    const { url, linkTo, linkParams, height, width, alt} = this.props
    if (linkTo) {
      return (
        <Link to={linkTo} params={linkParams} style={{'display': 'block'}}>
          <img src={url} width={width} height={height} alt={alt} />
        </Link>
      )
    } else {
      return (
        <img src={url} width={width} height={height} alt={alt} />
      )
    }
  }
}
Avatar.propTypes = {
  url: PropTypes.string.isRequired,
  linkTo: PropTypes.string,
  linkParams: PropTypes.object,
  height: PropTypes.number,
  width: PropTypes.number,
  alt: PropTypes.string,
  float: PropTypes.string,
}
Avatar.defaultProps = {
  linkParams: {},
  linkTo: '',
  height: 50,
  width: 50,
  alt: 'User Avatar',
}<commit_msg>Added a place holding kitten to Avatar<commit_after>/*
 * Retro Game Night
 * Copyright (c) 2015 <NAME>, <NAME>
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.txt file in the root directory of this source tree.
 */
import './Avatar.less'
import React, { PropTypes } from 'react'
import { Link } from 'react-router'

export default class Avatar extends React.Component {
  render() {
    const { url, linkTo, linkParams, height, width, alt} = this.props
    const kittenUrl = 'http://placekitten.com/g/50/50'
    if (linkTo) {
      return (
        <Link to={linkTo} params={linkParams} style={{'display': 'block'}}>
          <img src={url || kittenUrl} width={width} height={height} alt={alt} />
        </Link>
      )
    } else {
      return (
        <img src={url} width={width} height={height} alt={alt} />
      )
    }
  }
}
Avatar.propTypes = {
  url: PropTypes.string.isRequired,
  linkTo: PropTypes.string,
  linkParams: PropTypes.object,
  height: PropTypes.number,
  width: PropTypes.number,
  alt: PropTypes.string,
  float: PropTypes.string,
}
Avatar.defaultProps = {
  linkParams: {},
  linkTo: '',
  height: 50,
  width: 50,
  alt: 'User Avatar',
}
{'fraction_non_alphanumeric': 0.14279532669839895, 'fraction_numerical': 0.00865426222414539, 'mean_word_length': 3.1359570661896243, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '5263472', 'n_tokens_mistral': 753, 'n_tokens_neox': 751, 'n_words': 216}