<commit_before>import React, { PropTypes } from 'react'
import NonIETransitionGroup from '../components/NonIETransitionGroup'
import { bindActionCreators } from 'redux'
import { connect } from 'react-redux'
import { injectIntl, intlShape, defineMessages, FormattedMessage } from 'react-intl'
import { Link } from 'react-router'
import MediaQuery from 'react-responsive'

import WorkInformation from '../components/work/WorkInformation'
import Publications from '../components/Publications'
import * as ResourceActions from '../actions/ResourceActions'
import * as ReservationActions from '../actions/ReservationActions'
import * as ParameterActions from '../actions/ParameterActions'
import * as SearchFilterActions from '../actions/SearchFilterActions'
import AdditionalInformationContent from '../components/work/AdditionalInformationContent'

class Work extends React.Component {
  componentWillMount () {
    this.props.resourceActions.fetchWorkResource(this.props.params.workId)
  }

  // Force reload when router changes workId in URI
  componentWillReceiveProps(nextProps) {
    // Check for change in URI, to avoid infinite loops on fetch errors
    if (this.props.params.workId != nextProps.routeParams.workId) {
      this.props.resourceActions.fetchWorkResource(nextProps.routeParams.workId)
    }
  }


  renderNoWork () {
    return (
      <NonIETransitionGroup
        transitionName="fade-in"
        transitionAppear
        transitionAppearTimeout={500}
        transitionEnterTimeout={500}
        transitionLeaveTimeout={500}
        component="div"
        className="wrapper">
        <FormattedMessage {...messages.noWork} />
      </NonIETransitionGroup>
    )
  }

  renderEmpty () {
    return (
      <NonIETransitionGroup
        transitionName="fade-in"
        transitionAppear
        transitionAppearTimeout={500}
        transitionEnterTimeout={500}
        transitionLeaveTimeout={500}
        component="div"
        className="wrapper">
        <article className="work-entry loading">
          <i className="icon-spin4 animate-spin" />
        </article>
      </NonIETransitionGroup><commit_msg>patron-client: linting<commit_after>import React, { PropTypes } from 'react'
import NonIETransitionGroup from '../components/NonIETransitionGroup'
import { bindActionCreators } from 'redux'
import { connect } from 'react-redux'
import { injectIntl, intlShape, defineMessages, FormattedMessage } from 'react-intl'
import { Link } from 'react-router'
import MediaQuery from 'react-responsive'

import WorkInformation from '../components/work/WorkInformation'
import Publications from '../components/Publications'
import * as ResourceActions from '../actions/ResourceActions'
import * as ReservationActions from '../actions/ReservationActions'
import * as ParameterActions from '../actions/ParameterActions'
import * as SearchFilterActions from '../actions/SearchFilterActions'
import AdditionalInformationContent from '../components/work/AdditionalInformationContent'

class Work extends React.Component {
  componentWillMount () {
    this.props.resourceActions.fetchWorkResource(this.props.params.workId)
  }

  // Force reload when router changes workId in URI
  componentWillReceiveProps (nextProps) {
    // Check for change in URI, to avoid infinite loops on fetch errors
    if (this.props.params.workId !== nextProps.routeParams.workId) {
      this.props.resourceActions.fetchWorkResource(nextProps.routeParams.workId)
    }
  }

  renderNoWork () {
    return (
      <NonIETransitionGroup
        transitionName="fade-in"
        transitionAppear
        transitionAppearTimeout={500}
        transitionEnterTimeout={500}
        transitionLeaveTimeout={500}
        component="div"
        className="wrapper">
        <FormattedMessage {...messages.noWork} />
      </NonIETransitionGroup>
    )
  }

  renderEmpty () {
    return (
      <NonIETransitionGroup
        transitionName="fade-in"
        transitionAppear
        transitionAppearTimeout={500}
        transitionEnterTimeout={500}
        transitionLeaveTimeout={500}
        component="div"
        className="wrapper">
        <article className="work-entry loading">
          <i className="icon-spin4 animate-spin" />
        </article>
      </NonIETransitionGroup>
{'fraction_non_alphanumeric': 0.09981299672744273, 'fraction_numerical': 0.008882655446470314, 'mean_word_length': 3.6460369163952224, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, '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': '249800', 'n_tokens_mistral': 1122, 'n_tokens_neox': 1100, 'n_words': 253}