<commit_before>import Hoodie from '@hoodie/client'
import PouchDB from 'pouchdb'
import {createStore, applyMiddleware, compose} from 'redux'
import thunkMiddleware from 'redux-thunk'

import rootReducer from '../reducers'

const hoodie = new Hoodie({
  url: '',
  PouchDB
})

// Create Redux-Store with Hoodie
const configureStore = preloadedState => {
  const middleware = applyMiddleware(
    thunkMiddleware.withExtraArgument({
      hoodie,
      circuit: null // will be set on login
    })
  )

  // For development
  // use with https://github.com/zalmoxisus/redux-devtools-extension
  const enhancers = process.env.NODE_ENV !== 'production'
    ? (window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose)(middleware)
    : middleware

  const store = createStore(
    rootReducer,
    preloadedState,
    enhancers
  )

  if (process.env.NODE_ENV !== 'production') {
    if (module.hot) {
      // Enable Webpack hot module replacement for reducers
      module.hot.accept('../reducers', () => {
        store.replaceReducer(rootReducer)
      })
    }
    window.devHoodie = hoodie
  }<commit_msg>feat(configureStore): add setup for the cryptoStore<commit_after>import Hoodie from '@hoodie/client'
import PouchDB from 'pouchdb'
import setupCryptoStore from 'hoodie-plugin-store-crypto'
import {createStore, applyMiddleware, compose} from 'redux'
import thunkMiddleware from 'redux-thunk'

import rootReducer from '../reducers'

const hoodie = new Hoodie({
  url: '',
  PouchDB
})

setupCryptoStore(hoodie)

// Create Redux-Store with Hoodie
const configureStore = preloadedState => {
  const middleware = applyMiddleware(
    thunkMiddleware.withExtraArgument({
      hoodie,
      circuit: null // will be set on login
    })
  )

  // For development
  // use with https://github.com/zalmoxisus/redux-devtools-extension
  const enhancers = process.env.NODE_ENV !== 'production'
    ? (window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose)(middleware)
    : middleware

  const store = createStore(
    rootReducer,
    preloadedState,
    enhancers
  )

  if (process.env.NODE_ENV !== 'production') {
    if (module.hot) {
      // Enable Webpack hot module replacement for reducers
      module.hot.accept('../reducers', () => {
        store.replaceReducer(rootReducer)
      })
    }
    window.devHoodie = hoodie
  }
{'fraction_non_alphanumeric': 0.11063464837049743, 'fraction_numerical': 0.0, 'mean_word_length': 3.4608030592734225, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '5496562', 'n_tokens_mistral': 756, 'n_tokens_neox': 728, 'n_words': 172}