<commit_before>import * as React from 'react';
import { Input } from 'reactstrap';
import Icon from '../../../components/Icon';
import { IPagination } from '../../../interfaces.d';

interface IProps {
  pagination: IPagination;
  setPagination: (pagination: IPagination) => void;
  sizes?: number[];
}

const PageSize: React.SFC<IProps> = ({ pagination, setPagination, sizes }) => {
  const { total, limit, offset } = pagination;
  const maxOffset = Math.ceil(total / limit);
  return <Input type="select"
    onChange={(e) => {
      console.log(e.target.value);
      setPagination({ ...pagination, limit: Number(e.target.value) });
    }}>
    {
      sizes.map((size) => <option key={size} value={size}>{size}</option>)
    }
  </Input>;
};

PageSize.defaultProps = {
  sizes: [10, 20, 50, 100],
};

export default PageSize;
<commit_msg>remove console log<commit_after>import * as React from 'react';
import { Input } from 'reactstrap';
import Icon from '../../../components/Icon';
import { IPagination } from '../../../interfaces.d';

interface IProps {
  pagination: IPagination;
  setPagination: (pagination: IPagination) => void;
  sizes?: number[];
}

const PageSize: React.SFC<IProps> = ({ pagination, setPagination, sizes }) => {
  const { total, limit, offset } = pagination;
  const maxOffset = Math.ceil(total / limit);
  return <Input type="select"
    onChange={(e) => {
      setPagination({ ...pagination, limit: Number(e.target.value) });
    }}>
    {
      sizes.map((size) => <option key={size} value={size}>{size}</option>)
    }
  </Input>;
};

PageSize.defaultProps = {
  sizes: [10, 20, 50, 100],
};

export default PageSize;

{'fraction_non_alphanumeric': 0.1864406779661017, 'fraction_numerical': 0.010895883777239709, 'mean_word_length': 3.604456824512535, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 21, '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': '1543354', 'n_tokens_mistral': 547, 'n_tokens_neox': 550, 'n_words': 131}