<commit_before>import React from 'react'
import classnames from 'classnames'
//
// import _ from './utils'

const defaultButton = (props) => (
  <button {...props} className='-btn'>{props.children}</button>
)

export default React.createClass({
  getInitialState () {
    return {
      page: this.props.currentPage
    }
  },
  componentWillReceiveProps (nextProps) {
    this.setState({page: nextProps.currentPage})
  },
  getSafePage (page) {
    return Math.min(Math.max(page, 0), this.props.pagesLength - 1)
  },
  changePage (page) {
    page = this.getSafePage(page)
    this.setState({page})
    this.props.onChange(page)
  },
  applyPage (e) {
    e && e.preventDefault()
    const page = this.state.page
    this.changePage(page === '' ? this.props.currentPage : page)
  },
  render () {
    const {
      currentPage,
      pagesLength,
      showPageSizeOptions,
      pageSizeOptions,
      pageSize,
      showPageJump,
      canPrevious,
      canNext,
      onPageSizeChange
    } = this.props

    const PreviousComponent = this.props.PreviousComponent || defaultButton
    const NextComponent = this.props.NextComponent || defaultButton

    return (
      <div
        className={classnames(this.props.paginationClassName, '-pagination')}
        style={this.props.paginationStyle}
      >
        <div className='-previous'>
          <PreviousComponent<commit_msg>Fix typo when overriding pagination components (#17)<commit_after>import React from 'react'
import classnames from 'classnames'
//
// import _ from './utils'

const defaultButton = (props) => (
  <button {...props} className='-btn'>{props.children}</button>
)

export default React.createClass({
  getInitialState () {
    return {
      page: this.props.currentPage
    }
  },
  componentWillReceiveProps (nextProps) {
    this.setState({page: nextProps.currentPage})
  },
  getSafePage (page) {
    return Math.min(Math.max(page, 0), this.props.pagesLength - 1)
  },
  changePage (page) {
    page = this.getSafePage(page)
    this.setState({page})
    this.props.onChange(page)
  },
  applyPage (e) {
    e && e.preventDefault()
    const page = this.state.page
    this.changePage(page === '' ? this.props.currentPage : page)
  },
  render () {
    const {
      currentPage,
      pagesLength,
      showPageSizeOptions,
      pageSizeOptions,
      pageSize,
      showPageJump,
      canPrevious,
      canNext,
      onPageSizeChange
    } = this.props

    const PreviousComponent = this.props.previousComponent || defaultButton
    const NextComponent = this.props.nextComponent || defaultButton

    return (
      <div
        className={classnames(this.props.paginationClassName, '-pagination')}
        style={this.props.paginationStyle}
      >
        <div className='-previous'>
          <PreviousComponent
{'fraction_non_alphanumeric': 0.12495550017799929, 'fraction_numerical': 0.002135991456034176, 'mean_word_length': 2.93006993006993, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '3171616', 'n_tokens_mistral': 849, 'n_tokens_neox': 837, 'n_words': 163}