mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-10-11 05:30: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
|
||||
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();
|
||||
|
||||
/************************************************************************
|
||||
*************************************************************************
|
||||
@@ -76,8 +82,6 @@ const updateURLMiddleware = store => {
|
||||
// }
|
||||
|
||||
return nextAction;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
export default updateURLMiddleware;
|
||||
|
||||
Reference in New Issue
Block a user