<commit_before>import {combineReducers} from 'redux';
import lj001 from '../../assets/diffData/lj001.js';
import dg001 from '../../assets/diffData/dg001.js';
import {types} from '../actions/action.js';

const ljPages = Object.keys(lj001);
const dgPages = Object.keys(dg001);

console.log(ljPages);

const initialState = {
  currentPage: ljPages[0],
  pageNumber: 0,
  pages: ljPages,
  warnNext: false,
  warnPre: false,
  ljText: lj001[ljPages[0]],
  dgText: dg001[ljPages[0]]
}

const pager = (state = initialState, action) => {
  switch(action.type) {
    case 'PAGENEXT':
      if(state.pages.length < (state.pageNumber + 2)) {
        return {
          ...state,
          warnNext: true
        }
      }else {
        return {
          ...state,
          warnPre: false,
          pageNumber: state.pageNumber + 1,
          currentPage: state.pages[state.pageNumber + 1],
          ljText: lj001[state.pages[state.pageNumber + 1]],
          dgText: dg001[state.pages[state.pageNumber + 1]]
        }
      }<commit_msg>rm console<commit_after>import {combineReducers} from 'redux';
import lj001 from '../../assets/diffData/lj001.js';
import dg001 from '../../assets/diffData/dg001.js';
import {types} from '../actions/action.js';

const ljPages = Object.keys(lj001);
const dgPages = Object.keys(dg001);

const initialState = {
  currentPage: ljPages[0],
  pageNumber: 0,
  pages: ljPages,
  warnNext: false,
  warnPre: false,
  ljText: lj001[ljPages[0]],
  dgText: dg001[ljPages[0]]
}

const pager = (state = initialState, action) => {
  switch(action.type) {
    case 'PAGENEXT':
      if(state.pages.length < (state.pageNumber + 2)) {
        return {
          ...state,
          warnNext: true
        }
      }else {
        return {
          ...state,
          warnPre: false,
          pageNumber: state.pageNumber + 1,
          currentPage: state.pages[state.pageNumber + 1],
          ljText: lj001[state.pages[state.pageNumber + 1]],
          dgText: dg001[state.pages[state.pageNumber + 1]]
        }
      }
{'fraction_non_alphanumeric': 0.14833005893909626, 'fraction_numerical': 0.03831041257367387, 'mean_word_length': 2.518134715025907, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '2817172', 'n_tokens_mistral': 751, 'n_tokens_neox': 689, 'n_words': 142}