<commit_before>'use strict';

/**
 * @file
 * Profile component displays the user attributes and allows editing.
 */

import React from 'react';
import ProfileImage from './ProfileImage.component.js';
import ProfileAttribute from './ProfileAttribute.component.js';
import ProfileHeader from './ProfileHeader.component.js';
import ProfileSocialSummary from './ProfileSocialSummary.component.js';

import ProfileStore from '../../stores/Profile.store.js';


const Profile = React.createClass({

  displayName: function() {
    return 'ReactProfile';
  },

  getInitialState: function () {
    return {profile: ProfileStore.getProfile()};
  },

  componentDidMount: function () {
    ProfileStore.listen(this.updateProfile);
  },

  updateProfile: function (profile) {
    this.setState({profile: profile});
  },

  render: function () {
    let profile = this.state.profile;
    let editable = profile.editEnabled;
    let groupsCount = profile.groupsCount;
    let followingCount = profile.followingCount;
    let followersCount = profile.followersCount;
    return (
      <div>
        <ProfileHeader editable={editable} ref='header'/>
        <ProfileImage editable={editable} url={profile.imageUrl} />
        <ProfileAttribute editable={editable} name='Name' type='string' value={profile.name}/>
        <ProfileSocialSummary followerCount={followersCount} followingCount={followingCount}
                              groupsCount={groupsCount} />
      </div>
    );
  }
});

export default Profile;<commit_msg>minor codeformatting<commit_after>'use strict';

/**
 * @file
 * Profile component displays the user attributes and allows editing.
 */

import React from 'react';
import ProfileImage from './ProfileImage.component.js';
import ProfileAttribute from './ProfileAttribute.component.js';
import ProfileHeader from './ProfileHeader.component.js';
import ProfileSocialSummary from './ProfileSocialSummary.component.js';

import ProfileStore from '../../stores/Profile.store.js';

const Profile = React.createClass({

  displayName: function() {
    return 'ReactProfile';
  },

  getInitialState: function() {
    return {profile: ProfileStore.getProfile()};
  },

  componentDidMount: function() {
    ProfileStore.listen(this.updateProfile);
  },

  updateProfile: function(profile) {
    this.setState({profile: profile});
  },

  render: function() {
    const profile = this.state.profile;
    const editable = profile.editEnabled;
    const groupsCount = profile.groupsCount;
    const followingCount = profile.followingCount;
    const followersCount = profile.followersCount;
    return (
      <div>
        <ProfileHeader editable={editable} ref='header' />
        <ProfileImage editable={editable} url={profile.imageUrl} />
        <ProfileAttribute editable={editable} name='Name' type='string' value={profile.name} />
        <ProfileSocialSummary
          followerCount={followersCount}
          followingCount={followingCount}
          groupsCount={groupsCount}
          />
      </div>
    );
  }
});

export default Profile;
{'fraction_non_alphanumeric': 0.12303664921465969, 'fraction_numerical': 0.0, 'mean_word_length': 3.7248840803709427, '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': '5990737', 'n_tokens_mistral': 817, 'n_tokens_neox': 796, 'n_words': 187}