<commit_before>import {browserHistory} from 'react-router';
import PropTypes from 'prop-types';
import React from 'react';
import createReactClass from 'create-react-class';
import Reflux from 'reflux';

import {fetchTeamDetails} from 'app/actionCreators/teams';
import {t} from 'app/locale';
import ApiMixin from 'app/mixins/apiMixin';
import IdBadge from 'app/components/idBadge';
import ListLink from 'app/components/listLink';
import LoadingError from 'app/components/loadingError';
import LoadingIndicator from 'app/components/loadingIndicator';
import NavTabs from 'app/components/navTabs';
import OrganizationState from 'app/mixins/organizationState';
import TeamStore from 'app/stores/teamStore';
import recreateRoute from 'app/utils/recreateRoute';

const TeamDetails = createReactClass({
  displayName: 'TeamDetails',

  propTypes: {
    routes: PropTypes.array,
  },

  mixins: [ApiMixin, OrganizationState, Reflux.listenTo(TeamStore, 'onTeamStoreUpdate')],

  getInitialState() {
    const team = TeamStore.getBySlug(this.props.params.teamId);

    return {
      loading: !TeamStore.initialized,
      error: false,
      team,
    };
  },

  componentWillReceiveProps(nextProps) {
    const params = this.props.params;
    if (
      nextProps.params.teamId !== params.teamId ||
      nextProps.params.orgId !== params.orgId
    ) {
      this.setState(
        {
          loading: true,
          error: false,
        },<commit_msg>ref: Remove unused organization state (#12284)<commit_after>import {browserHistory} from 'react-router';
import PropTypes from 'prop-types';
import React from 'react';
import createReactClass from 'create-react-class';
import Reflux from 'reflux';

import {fetchTeamDetails} from 'app/actionCreators/teams';
import {t} from 'app/locale';
import ApiMixin from 'app/mixins/apiMixin';
import IdBadge from 'app/components/idBadge';
import ListLink from 'app/components/listLink';
import LoadingError from 'app/components/loadingError';
import LoadingIndicator from 'app/components/loadingIndicator';
import NavTabs from 'app/components/navTabs';
import TeamStore from 'app/stores/teamStore';
import recreateRoute from 'app/utils/recreateRoute';

const TeamDetails = createReactClass({
  displayName: 'TeamDetails',

  propTypes: {
    routes: PropTypes.array,
  },

  mixins: [ApiMixin, Reflux.listenTo(TeamStore, 'onTeamStoreUpdate')],

  getInitialState() {
    const team = TeamStore.getBySlug(this.props.params.teamId);

    return {
      loading: !TeamStore.initialized,
      error: false,
      team,
    };
  },

  componentWillReceiveProps(nextProps) {
    const params = this.props.params;
    if (
      nextProps.params.teamId !== params.teamId ||
      nextProps.params.orgId !== params.orgId
    ) {
      this.setState(
        {
          loading: true,
          error: false,
        },
{'fraction_non_alphanumeric': 0.1143859649122807, 'fraction_numerical': 0.0017543859649122807, 'mean_word_length': 4.100178890876565, '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': '2564409', 'n_tokens_mistral': 864, 'n_tokens_neox': 853, 'n_words': 202}