<commit_before>import React from 'react';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import Header from './../app/header';
import {
  getFeedContent,
  getMoreFeedContent,
  getUserFeedContent,
  getMoreUserFeedContent,
} from './../feed/feedActions';
import { getUserComments, getMoreUserComments } from './userProfileActions';

@connect(
  state => ({
    feed: state.feed,
    posts: state.posts,
    comments: state.comments,
  }),
  dispatch => bindActionCreators({
    getFeedContent,
    getMoreFeedContent,
    getUserComments,
    getMoreUserComments
  }, dispatch)
)
export default class UserProfile extends React.Component {
  constructor(props) {
    super(props);
  }

  render() {
    const { auth } = this.props;
    const account = auth.user && auth.user.name;

    return (
      <div className="main-panel">
        { auth.isFetching ?
          <div>
            <Header account={account} />
            <h1>Logging in...</h1>
          </div>
          :
          <div>
            <Header account={account} />
            { React.cloneElement(
              this.props.children,
              {
                ...this.props,
                limit: 10,
              }
            ) }
          </div>
        }
      </div>
    );
  }
}
<commit_msg>dispatch setMenu on Profile pages<commit_after>import React from 'react';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import Header from './../app/header';
import {
  getFeedContent,
  getMoreFeedContent,
  getUserFeedContent,
  getMoreUserFeedContent,
} from './../feed/feedActions';
import { getUserComments, getMoreUserComments } from './userProfileActions';
import appActions from './../actions';

@connect(
  state => ({
    feed: state.feed,
    posts: state.posts,
    comments: state.comments,
  }),
  dispatch => bindActionCreators({
    getFeedContent,
    getMoreFeedContent,
    getUserComments,
    getMoreUserComments,
    setMenu: appActions.setMenu,
  }, dispatch)
)
export default class UserProfile extends React.Component {
  constructor(props) {
    super(props);
  }

  componentDidUpdate() {
    this.props.setMenu('secondary');
  }

  render() {
    const { auth } = this.props;
    const account = auth.user && auth.user.name;

    return (
      <div className="main-panel">
        { auth.isFetching ?
          <div>
            <Header account={account} />
            <h1>Logging in...</h1>
          </div>
          :
          <div>
            <Header account={account} />
            { React.cloneElement(
              this.props.children,
              {
                ...this.props,
                limit: 10,
              }
            ) }
          </div>
        }
      </div>
    );
  }
}

{'fraction_non_alphanumeric': 0.12895114942528735, 'fraction_numerical': 0.0028735632183908046, 'mean_word_length': 2.0075593952483803, 'pattern_counts': {'":': 0, '<': 23, '<?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': '3184594', 'n_tokens_mistral': 823, 'n_tokens_neox': 805, 'n_words': 170}