mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-10-03 02:48:11 +08:00
Create reducer for controls
This commit is contained in:
Vendored
+14
@@ -0,0 +1,14 @@
|
|||||||
|
const Controls = (state = {
|
||||||
|
color: null,
|
||||||
|
}, action) => {
|
||||||
|
switch (action.type) {
|
||||||
|
case "color changed":
|
||||||
|
return Object.assign({}, state, {
|
||||||
|
color: action.data,
|
||||||
|
});
|
||||||
|
default:
|
||||||
|
return state;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
export default Controls;
|
||||||
@@ -4,11 +4,13 @@ import thunk from "redux-thunk";
|
|||||||
|
|
||||||
import initialize from "./initialize";
|
import initialize from "./initialize";
|
||||||
import cells from "./cells";
|
import cells from "./cells";
|
||||||
|
import controls from "./controls";
|
||||||
import selectedMetadata from "./selectedMetadata";
|
import selectedMetadata from "./selectedMetadata";
|
||||||
|
|
||||||
const Reducer = combineReducers({
|
const Reducer = combineReducers({
|
||||||
initialize,
|
initialize,
|
||||||
cells,
|
cells,
|
||||||
|
controls,
|
||||||
selectedMetadata,
|
selectedMetadata,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user