<commit_before>import 'babel-polyfill';
import 'whatwg-fetch';

import React from 'react';
import ReactDOM from 'react-dom';
import FastClick from 'fastclick';
import { ThemeProvider } from 'styled-components';
import 'semantic-ui-css/semantic.css';
import { Provider } from 'react-redux';
import configureStore from '../redux/configureStore';

import router from './router';
import history from './history';

const defaultTheme = {
  primary: 'palevioletred',
  secondary: 'white'
};

// Loaded with utils/routes-loader.js
let routes = require('./routes.json').default;

const container = document.getElementById('container');
const store = configureStore();

function renderComponent(component) {
  ReactDOM.render(
    <Provider store={store}>
      <ThemeProvider theme={defaultTheme}>
        {component}
      </ThemeProvider>
    </Provider>,
    container
  );
}

// Find and render a web page matching the current URL path, if such page is not found then render an error page (see
// routes.json, core/router.js)
function render(location) {
  router
    .resolve(routes, location)
    .then(renderComponent)
    .catch(error =>
      router.resolve(routes, { ...location, error }).then(renderComponent)
    );
}

// Handle client-side navigation by using HTML5 History API
// For more information visit https://github.com/ReactJSTraining/history/tree/master/docs#readme
history.listen(render);
render(history.location);
<commit_msg>fix issue with react-hot-loader not working with react-router<commit_after>import 'babel-polyfill';
import 'whatwg-fetch';

import React from 'react';
import ReactDOM from 'react-dom';
import { AppContainer } from 'react-hot-loader';
import FastClick from 'fastclick';
import { ThemeProvider } from 'styled-components';
import 'semantic-ui-css/semantic.css';
import { Provider } from 'react-redux';
import configureStore from '../redux/configureStore';

import router from './router';
import history from './history';

const defaultTheme = {
  primary: 'palevioletred',
  secondary: 'white'
};

// Loaded with utils/routes-loader.js
let routes = require('./routes.json').default;

const container = document.getElementById('container');
const store = configureStore();

function renderComponent(component) {
  ReactDOM.render(
    <AppContainer>
      <Provider store={store}>
        <ThemeProvider theme={defaultTheme}>
          {component}
        </ThemeProvider>
      </Provider>
    </AppContainer>,
    container
  );
}

// Find and render a web page matching the current URL path, if such page is not found then render an error page (see
// routes.json, core/router.js)
function render(location) {
  router
    .resolve(routes, location)
    .then(renderComponent)
    .catch(error =>
      router.resolve(routes, { ...location, error }).then(renderComponent)
    );
}

// Handle client-side navigation by using HTML5 History API
// For more information visit https://github.com/ReactJSTraining/history/tree/master/docs#readme
history.listen(render);
render(history.location);

{'fraction_non_alphanumeric': 0.12714663143989433, 'fraction_numerical': 0.0006605019815059445, 'mean_word_length': 4.1689419795221845, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 15, 'https://': 2, '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': '3159761', 'n_tokens_mistral': 844, 'n_tokens_neox': 851, 'n_words': 249}