client/src/store/configureStore.js
changeset 55 a2761c5be551
parent 47 64428c7ebc19
child 56 96543c395baa
--- a/client/src/store/configureStore.js	Mon Jun 19 17:30:03 2017 +0200
+++ b/client/src/store/configureStore.js	Mon Jun 19 17:56:43 2017 +0200
@@ -6,6 +6,8 @@
 import handleTransitions from 'redux-history-transitions';
 import createSagaMiddleware from 'redux-saga'
 import Immutable from 'immutable';
+import APIClient from '../APIClient';
+import config from '../config';
 
 const token = localStorage.getItem('token');
 const currentUser = localStorage.getItem('currentUser');
@@ -37,7 +39,11 @@
     transitions
   ));
 
-  saga.run(rootSaga)
+  const context = {
+      client: new APIClient(config.apiRootUrl)
+  }
+
+  saga.run(rootSaga, context);
 
   store.dispatch(loadSessions());