<commit_before>import { Component, PropTypes } from 'react';
// Components
import ThreadUsers from './thread_users';
import { ContentInbox, ActionGrade } from 'material-ui/lib/svg-icons';
import { Avatar, List, ListItem, Styles } from 'material-ui';
import ComponentStyle from '../../styles/right/mini_profile';
const { Colors } = Styles;
// Collections
import UserAvatars from '../../../collections/user_avatars';

/**
* MiniProfile component
* Is render in Popover on top right side of screen
* Include upload new avatar form & signout button
*/
export default class MiniProfile extends React.Component {
  static propTypes = {
    currentUser: PropTypes.object, // User signed in object
    signOut: PropTypes.func,
    updateUserAvatar: PropTypes.func
  };
  
  constructor(props, context) {
    super(props);
    // Image proccessing methods
    this._uploadImg = this._uploadImg.bind(this);
    this._resizeImg = this._resizeImg.bind(this);
    this.updateAvatar = this.updateAvatar.bind(this);
  }

  render() {
    if (!this.props.currentUser) {
      return <div/>
    }
    let user = this.props.currentUser;
    var avatar = <Avatar>{user.username[0]}</Avatar>;
    if (user.profile) {
      if (user.profile.avatar) {
        avatar = <Avatar src={user.profile.avatar}/>;
      }
    }
    return (
      <List style={ComponentStyle.list}><commit_msg>Not React.Component<commit_after>import { Component, PropTypes } from 'react';
// Components
import ThreadUsers from './thread_users';
import { ContentInbox, ActionGrade } from 'material-ui/lib/svg-icons';
import { Avatar, List, ListItem, Styles } from 'material-ui';
import ComponentStyle from '../../styles/right/mini_profile';
const { Colors } = Styles;
// Collections
import UserAvatars from '../../../collections/user_avatars';

/**
* MiniProfile component
* Is render in Popover on top right side of screen
* Include upload new avatar form & signout button
*/
export default class MiniProfile extends Component {
  static propTypes = {
    currentUser: PropTypes.object, // User signed in object
    signOut: PropTypes.func,
    updateUserAvatar: PropTypes.func
  };
  
  constructor(props, context) {
    super(props);
    // Image proccessing methods
    this._uploadImg = this._uploadImg.bind(this);
    this._resizeImg = this._resizeImg.bind(this);
    this.updateAvatar = this.updateAvatar.bind(this);
  }

  render() {
    if (!this.props.currentUser) {
      return <div/>
    }
    let user = this.props.currentUser;
    var avatar = <Avatar>{user.username[0]}</Avatar>;
    if (user.profile) {
      if (user.profile.avatar) {
        avatar = <Avatar src={user.profile.avatar}/>;
      }
    }
    return (
      <List style={ComponentStyle.list}>
{'fraction_non_alphanumeric': 0.1305942773294204, 'fraction_numerical': 0.0007336757153338225, 'mean_word_length': 3.3701923076923075, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '2399094', 'n_tokens_mistral': 820, 'n_tokens_neox': 817, 'n_words': 208}