--- a/client/src/store/configureStore.js Thu Jun 15 17:18:22 2017 +0200
+++ b/client/src/store/configureStore.js Fri Jun 16 18:36:39 2017 +0200
@@ -1,8 +1,9 @@
import rootReducer from '../reducers';
import rootSaga from '../sagas';
import { loadSessions } from '../actions/sessionsActions';
-import { createStore, applyMiddleware } from 'redux';
+import { createStore, applyMiddleware, compose } from 'redux';
import { routerMiddleware } from 'react-router-redux';
+import handleTransitions from 'redux-history-transitions';
import createSagaMiddleware from 'redux-saga'
import Immutable from 'immutable';
@@ -11,6 +12,13 @@
sessions: Immutable.List([]),
notes: Immutable.List([]),
isAuthenticated: false,
+ currentUser: null,
+ token: null,
+ login: {
+ loading: false,
+ success: false,
+ error: false,
+ }
};
const storeInitialState = Immutable.Map(defaultState);
@@ -19,8 +27,12 @@
const router = routerMiddleware(history);
const saga = createSagaMiddleware();
+ const transitions = handleTransitions(history);
- const store = createStore(rootReducer, initialState, applyMiddleware(router, saga));
+ const store = createStore(rootReducer, initialState, compose(
+ applyMiddleware(router, saga),
+ transitions
+ ));
saga.run(rootSaga)