<commit_before>"use strict";
import { createStore } from "../utils/StoreUtils";
import ActionTypes from "../constants/ActionTypes";
import AppDispatcher from "../dispatchers/AppDispatcher";

var currentPage = 0;
var rowsPerPage = 50;

const PaginationStore = createStore({
	getCurrentPage() {
		return currentPage;
	},
	getRowsPerPage() {
		return rowsPerPage;
	},
	getOffset() {
		return currentPage * rowsPerPage || 0;
	}
});

const onReceivingAction = action => {
	const shouldResetTo0 = /FILTER/.test(action.type) ||
													/RESTRICT/.test(action.type);

	if (shouldResetTo0) {
		currentPage = 0;
		rowsPerPage = 50;
		console.log(rowsPerPage);
		PaginationStore.emitChange();
	} else {

		switch (action.type) {

			case ActionTypes.SWITCH_PAGE_NUMBER:
					currentPage = action.data;
					PaginationStore.emitChange();
					break;

			case ActionTypes.SET_ROWS_PER_PAGE:
					rowsPerPage = action.data;
					PaginationStore.emitChange();
					break;

		}

	}
<commit_msg>bludfire console logs<commit_after>"use strict";
import { createStore } from "../utils/StoreUtils";
import ActionTypes from "../constants/ActionTypes";
import AppDispatcher from "../dispatchers/AppDispatcher";

var currentPage = 0;
var rowsPerPage = 50;

const PaginationStore = createStore({
	getCurrentPage() {
		return currentPage;
	},
	getRowsPerPage() {
		return rowsPerPage;
	},
	getOffset() {
		return currentPage * rowsPerPage || 0;
	}
});

const onReceivingAction = action => {
	const shouldResetTo0 = /FILTER/.test(action.type) ||
													/RESTRICT/.test(action.type);

	if (shouldResetTo0) {
		currentPage = 0;
		rowsPerPage = 50;
		PaginationStore.emitChange();
	} else {

		switch (action.type) {

			case ActionTypes.SWITCH_PAGE_NUMBER:
					currentPage = action.data;
					PaginationStore.emitChange();
					break;

			case ActionTypes.SET_ROWS_PER_PAGE:
					rowsPerPage = action.data;
					PaginationStore.emitChange();
					break;

		}

	}

{'fraction_non_alphanumeric': 0.12332990750256938, 'fraction_numerical': 0.009249743062692703, 'mean_word_length': 3.6915662650602408, 'pattern_counts': {'":': 0, '<': 3, '<?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': '4604577', 'n_tokens_mistral': 746, 'n_tokens_neox': 624, 'n_words': 129}