mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-09-15 20:57:56 +08:00
31 lines
482 B
JavaScript
31 lines
482 B
JavaScript
const Dotplot = (
|
|
state = {
|
|
row: null,
|
|
column: null,
|
|
},
|
|
action
|
|
) => {
|
|
switch (action.type) {
|
|
case "set dotplot row":
|
|
return {
|
|
...state,
|
|
row: action.data,
|
|
};
|
|
case "set dotplot column":
|
|
return {
|
|
...state,
|
|
column: action.data,
|
|
};
|
|
case "toggle dotplot":
|
|
return {
|
|
...state,
|
|
row: null,
|
|
column: null,
|
|
};
|
|
default:
|
|
return state;
|
|
}
|
|
};
|
|
|
|
export default Dotplot;
|