<commit_before>import React, { Component } from 'react'
import PropTypes from 'prop-types'
import hoistStatics from 'hoist-non-react-statics'
import { getDisplayName } from '../utils'

export default function withRoute (ComposedComponent) {
  const displayName = getDisplayName(ComposedComponent)

  class WithRouteWrapper extends Component {
    static contextTypes = {
      router: PropTypes.object
    }

    static displayName = `withRoute(${displayName})`

    render () {
      const props = {
        router: this.context.router,
        ...this.props
      }

      return <ComposedComponent {...props} />
    }
  }

  return hoistStatics(WithRouteWrapper, ComposedComponent)
}<commit_msg>Rename withRoute to withRouter to be consistent (#2881)<commit_after>import React, { Component } from 'react'
import PropTypes from 'prop-types'
import hoistStatics from 'hoist-non-react-statics'
import { getDisplayName } from '../utils'

export default function withRouter (ComposedComponent) {
  const displayName = getDisplayName(ComposedComponent)

  class WithRouteWrapper extends Component {
    static contextTypes = {
      router: PropTypes.object
    }

    static displayName = `withRoute(${displayName})`

    render () {
      const props = {
        router: this.context.router,
        ...this.props
      }

      return <ComposedComponent {...props} />
    }
  }

  return hoistStatics(WithRouteWrapper, ComposedComponent)
}
{'fraction_non_alphanumeric': 0.10076441973592773, 'fraction_numerical': 0.002779708130646282, 'mean_word_length': 3.4171779141104293, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '891030', 'n_tokens_mistral': 407, 'n_tokens_neox': 395, 'n_words': 103}