{"size": 555, "ext": "js", "max_stars_repo_path": "src/store/index.js", "max_stars_repo_name": "santiagoep/zemoga-ui-test", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/store/index.js", "max_issues_repo_name": "santiagoep/zemoga-ui-test", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/store/index.js", "max_forks_repo_name": "santiagoep/zemoga-ui-test", "max_forks_repo_forks_event_min_datetime": "2021-02-06T01:06:50.000Z", "max_forks_repo_forks_event_max_datetime": "2021-02-08T05:16:24.000Z"}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": 2, "avg_line_length": 25.2272727273, "max_line_length": 68, "alphanum_fraction": 0.7405405405}
import { createStore } from 'redux';
import { persistReducer } from 'redux-persist';
import storage from 'redux-persist/lib/storage';
import { createWrapper } from 'next-redux-wrapper';

import rootReducer from './reducers';

const persistConfig = {
  key: 'primary',
  storage,
  whitelist: ['thumbs']
};

const persistedReducer = persistReducer(persistConfig, rootReducer);

export const makeStore = (initialState = {}) => {
  const newStore = createStore(persistedReducer, initialState);
  return newStore;
};

export default createWrapper(makeStore);
