aboutsummaryrefslogtreecommitdiff
path: root/src/client/react/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/react/lib')
-rw-r--r--src/client/react/lib/reduxMiddleware.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/client/react/lib/reduxMiddleware.js b/src/client/react/lib/reduxMiddleware.js
new file mode 100644
index 0000000..c153022
--- /dev/null
+++ b/src/client/react/lib/reduxMiddleware.js
@@ -0,0 +1,11 @@
+import moment from 'moment';
+import { applyMiddleware } from 'redux';
+import thunk from 'redux-thunk';
+import makeGetHistory from './getHistory';
+
+export default function makeReduxMiddleware({ history }) {
+ return applyMiddleware(thunk.withExtraArgument({
+ getHistory: makeGetHistory(history),
+ moment,
+ }));
+}