/* eslint-disable global-require */
import { createStore } from "redux"

import rootReducer from "./reducers"
import interceptOverEagerReactReduxWarning from "./dev-utils/intercept_overeager_reactredux_warning"

export default () => {
  const store = createStore(
    rootReducer,
    window.__REDUX_DEVTOOLS_EXTENSION__ && module.hot && window.__REDUX_DEVTOOLS_EXTENSION__()
  )

  // ensures that updates to reducers are hot reloaded
  if (module.hot) {
    interceptOverEagerReactReduxWarning()

    module.hot.accept("./reducers/index", () => {
      const nextRootReducer = require("./reducers/index").default
      store.replaceReducer(nextRootReducer)
    })
  }

  return store
}

@@ -205,16 +205,68 @@
 rning%22%0A%0A
+const isProd = location.host === %22remoteretro.org%22%0A%0A
 export d
@@ -329,16 +329,27 @@
 cer,%0A   
+ !isProd &&
  window.
@@ -383,22 +383,8 @@
 _ &&
- module.hot &&
  win

disable redux dev tools in prod