<commit_before>import React, {createClass} from 'react'
import classnames from 'classnames'

import connectorResults from './connector'
import Footer from '../Footer'
import Spinner from '../Spinner'
import Overlay from '../Overlay'
import NoHits from '../NoHits'
import Hits from '../Hits'

import './style.scss'

const Results = createClass({

  getInitialState () {
    return {loading: true, ready: false}
  },

  renderResults (props, hasResults) {
    const {get} = props
    const theme = 'Results w-100 fl bg-white vh-100 overflow-x-hidden overflow-y-scroll'

    const style = classnames(theme, {
      'Results__expand': get('asideLeftOpen')
    })

    const hasAsideOpen = get('asideRightOpen') || get('asideLeftOpen')
    const isMobile = get('isMobile')

    return (
      <section data-app='results' className={style}>
        {isMobile && <Overlay active={hasAsideOpen} />}
        {hasResults ? <Hits {...props} /> : <NoHits {...props} />}
        <Footer />
      </section>
    )
  },

  componentWillReceiveProps () {
    const {props, state} = this
    const {searching} = props
    const {ready} = state

    if (searching && !ready) this.setState({loading: false, ready: true})
  },

  renderLoader (props) {
    return (
      <article className='z-max fixed vh-100 dt w-100 bg-blue'>
        <div className='dtc v-mid tc'>
          <Spinner />
        </div>
      </article>
    )
  },

  render () {<commit_msg>Fix linter<commit_after>import React, {createClass} from 'react'
import classnames from 'classnames'

import connectorResults from './connector'
import Footer from '../Footer'
import Spinner from '../Spinner'
import Overlay from '../Overlay'
import NoHits from '../NoHits'
import Hits from '../Hits'

import './style.scss'

const Results = createClass({

  getInitialState () {
    return {loading: true, ready: false}
  },

  renderResults (props, hasResults) {
    const {get} = props
    const theme = 'Results w-100 fl bg-white vh-100 overflow-x-hidden overflow-y-scroll'

    const style = classnames(theme, {
      'Results__expand': get('asideLeftOpen')
    })

    const hasAsideOpen = get('asideLeftOpen') || get('asideRightOpen')
    const isMobile = get('isMobile')

    return (
      <section data-app='results' className={style}>
        {isMobile && <Overlay active={hasAsideOpen} />}
        {hasResults ? <Hits {...props} /> : <NoHits {...props} />}
        <Footer />
      </section>
    )
  },

  componentWillReceiveProps () {
    const {props, state} = this
    const {searching} = props
    const {ready} = state

    if (searching && !ready) this.setState({loading: false, ready: true})
  },

  renderLoader (props) {
    return (
      <article className='z-max fixed vh-100 dt w-100 bg-blue'>
        <div className='dtc v-mid tc'>
          <Spinner />
        </div>
      </article>
    )
  },

  render () {
{'fraction_non_alphanumeric': 0.14876607577337506, 'fraction_numerical': 0.008342022940563087, 'mean_word_length': 2.827127659574468, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 25, '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': '4087378', 'n_tokens_mistral': 928, 'n_tokens_neox': 891, 'n_words': 243}