mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-09-20 03:18:12 +08:00
Create reducer for controls
This commit is contained in:
14
src/reducers/controls.js
vendored
Normal file
14
src/reducers/controls.js
vendored
Normal file
@@ -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 cells from "./cells";
|
||||
import controls from "./controls";
|
||||
import selectedMetadata from "./selectedMetadata";
|
||||
|
||||
const Reducer = combineReducers({
|
||||
initialize,
|
||||
cells,
|
||||
controls,
|
||||
selectedMetadata,
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user