mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-10-10 20:20:56 +08:00
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:
@@ -1,15 +1,21 @@
|
|||||||
// jshint esversion: 6
|
// 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
|
https://medium.com/@jacobp100/you-arent-using-redux-middleware-enough-94ffe991e6
|
||||||
storeInstance => functionToCallWithAnActionThatWillSendItToTheNextMiddleware => actionThatDispatchWasCalledWith => valueToUseAsTheReturnValueOfTheDispatchCall
|
storeInstance
|
||||||
|
=> functionToCallWithAnActionThatWillSendItToTheNextMiddleware
|
||||||
|
=> actionThatDispatchWasCalledWith
|
||||||
|
=> valueToUseAsTheReturnValueOfTheDispatchCall
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const updateURLMiddleware = store => {
|
const updateURLMiddleware = (/* store */) => next => action => {
|
||||||
return next => {
|
// const oldState = store.getState();
|
||||||
return action => {
|
|
||||||
const oldState = store.getState();
|
|
||||||
const nextAction = next(action);
|
const nextAction = next(action);
|
||||||
|
|
||||||
if (action.type === "url changed") {
|
if (action.type === "url changed") {
|
||||||
@@ -17,7 +23,7 @@ const updateURLMiddleware = store => {
|
|||||||
return nextAction;
|
return nextAction;
|
||||||
}
|
}
|
||||||
|
|
||||||
const state = store.getState();
|
// const state = store.getState();
|
||||||
|
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
*************************************************************************
|
*************************************************************************
|
||||||
@@ -76,8 +82,6 @@ const updateURLMiddleware = store => {
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
return nextAction;
|
return nextAction;
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export default updateURLMiddleware;
|
export default updateURLMiddleware;
|
||||||
|
|||||||
Reference in New Issue
Block a user