<commit_before>/** @jsx React.DOM */

define(
  [
    'react',
    'components/common/PageHeader.react',
    './IconSelect.react',
    './SettingsHeader.react',
    'actions',
    'stores'
  ],
  function (React, PageHeader, IconSelect, SettingsHeader, actions, stores) {

    function getState() {
      return {
        profile: stores.ProfileStore.get()
      };
    }

    return React.createClass({

      getInitialState: function () {
        return getState();
      },

      updateState: function () {
        if (this.isMounted()) this.setState(getState());
      },

      componentDidMount: function () {
        stores.ProfileStore.addChangeListener(this.updateState);
      },

      componentWillUnmount: function () {
        stores.ProfileStore.removeChangeListener(this.updateState);
      },

      handleIconSelect: function (iconType) {
        actions.ProfileActions.updateProfileAttributes(this.state.profile, {icon_set: iconType});
      },

      handleChangeEmailPreference: function(event){
        var isChecked = event.target.checked;
        actions.ProfileActions.updateProfileAttributes(this.state.profile, {send_emails: isChecked});
      },

      handleRequestMoreResources: function(e){
        e.preventDefault();
        actions.HelpActions.requestMoreResources();
      },

      render: function () {
        var profile = this.state.profile;
        var selectedIconSet = profile.get('settings')['icon_set'];
        var wantsEmails = profile.get('settings')['send_emails'];

        return (<commit_msg>changed reference from actions.HelpActions to modals.HelpModals<commit_after>/** @jsx React.DOM */

define(
  [
    'react',
    'components/common/PageHeader.react',
    './IconSelect.react',
    './SettingsHeader.react',
    'actions',
    'modals',
    'stores'
  ],
  function (React, PageHeader, IconSelect, SettingsHeader, actions, modals, stores) {

    function getState() {
      return {
        profile: stores.ProfileStore.get()
      };
    }

    return React.createClass({

      getInitialState: function () {
        return getState();
      },

      updateState: function () {
        if (this.isMounted()) this.setState(getState());
      },

      componentDidMount: function () {
        stores.ProfileStore.addChangeListener(this.updateState);
      },

      componentWillUnmount: function () {
        stores.ProfileStore.removeChangeListener(this.updateState);
      },

      handleIconSelect: function (iconType) {
        actions.ProfileActions.updateProfileAttributes(this.state.profile, {icon_set: iconType});
      },

      handleChangeEmailPreference: function(event){
        var isChecked = event.target.checked;
        actions.ProfileActions.updateProfileAttributes(this.state.profile, {send_emails: isChecked});
      },

      handleRequestMoreResources: function(e){
        e.preventDefault();
        modals.HelpModals.requestMoreResources();
      },

      render: function () {
        var profile = this.state.profile;
        var selectedIconSet = profile.get('settings')['icon_set'];
        var wantsEmails = profile.get('settings')['send_emails'];

        return (
{'fraction_non_alphanumeric': 0.1265022137887413, 'fraction_numerical': 0.0, 'mean_word_length': 2.820048309178744, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6439337', 'n_tokens_mistral': 871, 'n_tokens_neox': 861, 'n_words': 145}