cleanup middleware pre-ship (mostly lint) (#329)

Fixes #180

URL middleware unused, but retained in expectation that we will need it shortly.
Fixed a bit of lint, mostly by reformatting or commenting out currently unused code.
This commit is contained in:
Bruce Martin
2018-10-15 08:45:34 -07:00
committed by GitHub
parent bf0154ada6
commit c7e6f54450
+13 -9
View File
@@ -1,15 +1,21 @@
// jshint esversion: 6
import uri from "urijs";
// import uri from "urijs";
/*
NOTE: file currently not used, but retained as we expect to reinstate features in this
area shortly.
*/
/*
https://medium.com/@jacobp100/you-arent-using-redux-middleware-enough-94ffe991e6
storeInstance => functionToCallWithAnActionThatWillSendItToTheNextMiddleware => actionThatDispatchWasCalledWith => valueToUseAsTheReturnValueOfTheDispatchCall
storeInstance
=> functionToCallWithAnActionThatWillSendItToTheNextMiddleware
=> actionThatDispatchWasCalledWith
=> valueToUseAsTheReturnValueOfTheDispatchCall
*/
const updateURLMiddleware = store => {
return next => {
return action => {
const oldState = store.getState();
const updateURLMiddleware = (/* store */) => next => action => {
// const oldState = store.getState();
const nextAction = next(action);
if (action.type === "url changed") {
@@ -17,7 +23,7 @@ const updateURLMiddleware = store => {
return nextAction;
}
const state = store.getState();
// const state = store.getState();
/************************************************************************
*************************************************************************
@@ -77,7 +83,5 @@ const updateURLMiddleware = store => {
return nextAction;
};
};
};
export default updateURLMiddleware;