<commit_before>import { createStore, applyMiddleware, compose } from 'redux'
import { routerMiddleware } from 'react-router-redux'
import TebukuroApp from '../reducers'

export default (preloadState = {}, history) => {
  const middlewares = [
    routerMiddleware(history)
  ]

  const composeEnhancers =
    process.env.NODE_ENV !== 'production' &&
    typeof window === 'object' &&
    window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ ?
      window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({}) : compose

  const enhancer = composeEnhancers(applyMiddleware(...middlewares))

  const store = createStore(TebukuroApp, {}, enhancer)

  if (module.hot) {<commit_msg>Add redux-promise middleware<commit_after>import { createStore, applyMiddleware, compose } from 'redux'
import { routerMiddleware } from 'react-router-redux'
import promiseMiddleware from 'redux-promise'
import TebukuroApp from '../reducers'

export default (preloadState = {}, history) => {
  const middlewares = [
    routerMiddleware(history),
    promiseMiddleware
  ]

  const composeEnhancers =
    process.env.NODE_ENV !== 'production' &&
    typeof window === 'object' &&
    window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ ?
      window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({}) : compose

  const enhancer = composeEnhancers(applyMiddleware(...middlewares))

  const store = createStore(TebukuroApp, {}, enhancer)

  if (module.hot) {
{'fraction_non_alphanumeric': 0.11532951289398281, 'fraction_numerical': 0.0, 'mean_word_length': 4.820833333333334, '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': '75531', 'n_tokens_mistral': 454, 'n_tokens_neox': 430, 'n_words': 87}