<commit_before>import PropTypes from 'prop-types';
import React, { Component } from 'react';
import _ from 'lodash';

const propTypes = {
  page: PropTypes.number.isRequired,
  pageCount: PropTypes.number.isRequired,
  pageSize: PropTypes.number.isRequired,
  onPageChange: PropTypes.func.isRequired,
  autoHidePagination: PropTypes.bool,
};

class Pagination extends Component {
  render() {
    const {
      page,
      pageSize,
      onPageChange,
      autoHidePagination,
    } = this.props;
    let { pageCount } = this.props;
    let hasPrevious = page > 0;
    let hasNext = page < pageCount - 1;
    if (pageSize < 1) {
      pageCount = 1;
      hasPrevious = false;
      hasNext = false;
    }
    if (pageCount > 1 || !autoHidePagination) {
      return (
        <nav>
          <ul className="pagination pagination-sm">
            <li className={`page-item ${hasPrevious ? '' : 'disabled'}`}>
              <a<commit_msg>Don't use pagination-sm by default<commit_after>import PropTypes from 'prop-types';
import React, { Component } from 'react';
import _ from 'lodash';

const propTypes = {
  page: PropTypes.number.isRequired,
  pageCount: PropTypes.number.isRequired,
  pageSize: PropTypes.number.isRequired,
  onPageChange: PropTypes.func.isRequired,
  autoHidePagination: PropTypes.bool,
};

class Pagination extends Component {
  render() {
    const {
      page,
      pageSize,
      onPageChange,
      autoHidePagination,
    } = this.props;
    let { pageCount } = this.props;
    let hasPrevious = page > 0;
    let hasNext = page < pageCount - 1;
    if (pageSize < 1) {
      pageCount = 1;
      hasPrevious = false;
      hasNext = false;
    }
    if (pageCount > 1 || !autoHidePagination) {
      return (
        <nav>
          <ul className="pagination">
            <li className={`page-item ${hasPrevious ? '' : 'disabled'}`}>
              <a
{'fraction_non_alphanumeric': 0.11618037135278515, 'fraction_numerical': 0.005305039787798408, 'mean_word_length': 2.68359375, 'pattern_counts': {'":': 0, '<': 15, '<?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': '3990870', 'n_tokens_mistral': 584, 'n_tokens_neox': 586, 'n_words': 142}