client/src/reducers/index.js
changeset 129 d48946d164c6
parent 107 e6f85e26b08c
child 134 be36eed5e6e0
equal deleted inserted replaced
128:34a75bd8d0b9 129:d48946d164c6
     1 //import { combineReducers } from 'redux-immutable';
     1 import { combineReducers } from 'redux-immutable';
     2 import { combineReducers } from 'redux';
       
     3 import { routerReducer } from 'react-router-redux';
     2 import { routerReducer } from 'react-router-redux';
     4 
     3 
     5 import notes from './notesReducer';
     4 import notes from './notesReducer';
     6 import { sessions } from './sessionsReducer';
     5 import { sessions } from './sessionsReducer';
     7 import { isAuthenticated, currentUser, login, register, token, groups, createGroup } from './authReducer';
     6 import { isAuthenticated, currentUser, login, register, token, groups, createGroup, clientId } from './authReducer';
     8 import { autoSubmit, outbox } from './miscReducer';
     7 import { autoSubmit, online } from './miscReducer';
       
     8 import { isSynchronizing, lastSync } from './syncReducer';
       
     9 
     9 
    10 
    10 const rootReducer = combineReducers({
    11 const rootReducer = combineReducers({
    11   sessions,
    12   sessions,
    12   notes,
    13   notes,
    13   isAuthenticated,
       
    14   currentUser,
       
    15   login,
    14   login,
    16   register,
    15   register,
    17   token,
    16   authStatus: combineReducers({
       
    17     token,
       
    18     currentUser,
       
    19     isAuthenticated,
       
    20     clientId,
       
    21     lastSync
       
    22   }),
       
    23   status: combineReducers({
       
    24     isSynchronizing,
       
    25     online
       
    26   }),
    18   router: routerReducer,
    27   router: routerReducer,
    19   autoSubmit,
    28   autoSubmit,
    20   groups,
    29   groups,
    21   createGroup,
    30   createGroup,
    22   offline: combineReducers({
       
    23     outbox
       
    24   })
       
    25 });
    31 });
    26 
    32 
       
    33 
    27 export default rootReducer;
    34 export default rootReducer;