<commit_before>import {Pagination} from 'tocco-ui'
import PropTypes from 'prop-types'
import React from 'react'

const InputEditPagination = ({count, currentPage, recordsPerPage, setCurrentPage}) =>
  count && currentPage
    ? <Pagination
      totalCount={count}
      currentPage={currentPage}
      recordsPerPage={recordsPerPage}
      onPageChange={setCurrentPage}/>
    : null

InputEditPagination.propTypes = {
  count: PropTypes.number.isRequired,
  currentPage: PropTypes.number.isRequired,
  recordsPerPage: PropTypes.number.isRequired,
  setCurrentPage: PropTypes.func.isRequired
}

export default InputEditPagination
<commit_msg>fix(input-edit): only display pagination when necessary<commit_after>import {Pagination} from 'tocco-ui'
import PropTypes from 'prop-types'
import React from 'react'

const InputEditPagination = ({count, currentPage, recordsPerPage, setCurrentPage}) =>
  count && currentPage && (currentPage > 1 || count > recordsPerPage)
    ? <Pagination
      totalCount={count}
      currentPage={currentPage}
      recordsPerPage={recordsPerPage}
      onPageChange={setCurrentPage}/>
    : null

InputEditPagination.propTypes = {
  count: PropTypes.number.isRequired,
  currentPage: PropTypes.number.isRequired,
  recordsPerPage: PropTypes.number.isRequired,
  setCurrentPage: PropTypes.func.isRequired
}

export default InputEditPagination

{'fraction_non_alphanumeric': 0.09759650400582666, 'fraction_numerical': 0.0007283321194464676, 'mean_word_length': 5.217194570135747, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '3838079', 'n_tokens_mistral': 390, 'n_tokens_neox': 406, 'n_words': 85}