client/src/reducers/index.js
author ymh <ymh.work@gmail.com>
Fri, 16 Nov 2018 11:19:13 +0100
changeset 173 0e6703cd0968
parent 172 4b780ebbedc6
permissions -rw-r--r--
Correct the Note editor. Split the source file in sub components. Correct a timing problem on the editor checkbox.

import { combineReducers } from 'redux';
import { connectRouter } from 'connected-react-router';

import notes from './notesReducer';
import { sessions } from './sessionsReducer';
import { isAuthenticated, currentUser, currentGroup, login, register, token, groups, createGroup, clientId } from './authReducer';
import { autoSubmit, online } from './miscReducer';
import { isSynchronizing, lastSync } from './syncReducer';


export default (history, wrapper) => wrapper(combineReducers({
  router: connectRouter(history),
  sessions,
  notes,
  login,
  register,
  authStatus: combineReducers({
    token,
    currentUser,
    currentGroup,
    isAuthenticated,
    clientId,
    lastSync
  }),
  status: combineReducers({
    isSynchronizing,
    online
  }),
  autoSubmit,
  groups,
  createGroup,
}));