{"size": 518, "ext": "js", "max_stars_repo_path": "src/app/store.js", "max_stars_repo_name": "maczikasz/go-runs-frontend", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/app/store.js", "max_issues_repo_name": "maczikasz/go-runs-frontend", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/app/store.js", "max_forks_repo_name": "maczikasz/go-runs-frontend", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 19.9230769231, "max_line_length": 59, "alphanum_fraction": 0.6467181467}
import { configureStore } from '@reduxjs/toolkit'
import loginReducer from '../features/login/login_slice'
import userReducer from '../features/login/user_slice'

var _ = require('lodash')

const store = configureStore({
  reducer: {
    login: loginReducer,
    user: userReducer
  }
})



store.subscribe(
  _.throttle(() => {
    const token = store.getState().login.token
    if (token) {
      localStorage.setItem('token', JSON.stringify(token))
    }
  }, 1000)
)

export default store
