mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-10-02 23:48:11 +08:00
Parametrization
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
const Spatial = (
|
||||
state = {
|
||||
loading: null,
|
||||
error: null,
|
||||
metadata: null,
|
||||
},
|
||||
action
|
||||
) => {
|
||||
switch (action.type) {
|
||||
case "request spatial metadata started":
|
||||
return {
|
||||
...state,
|
||||
loading: true,
|
||||
error: null,
|
||||
};
|
||||
case "request spatial metadata success":
|
||||
return {
|
||||
...state,
|
||||
error: null,
|
||||
loading: false,
|
||||
metadata: action,
|
||||
};
|
||||
case "request spatial metadata error":
|
||||
return {
|
||||
...state,
|
||||
loading: false,
|
||||
error: action.data,
|
||||
};
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
};
|
||||
|
||||
export default Spatial;
|
||||
Reference in New Issue
Block a user