mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-09-28 09:08:12 +08:00
27 lines
513 B
JavaScript
27 lines
513 B
JavaScript
const UserInfo = (state = {}, action) => {
|
|
switch (action.type) {
|
|
case "initial data load start":
|
|
return {
|
|
...state,
|
|
loading: true,
|
|
error: null,
|
|
};
|
|
case "userInfo load complete":
|
|
return {
|
|
...state,
|
|
loading: false,
|
|
error: null,
|
|
...action.userInfo,
|
|
};
|
|
case "initial data load error":
|
|
return {
|
|
...state,
|
|
error: action.error,
|
|
};
|
|
default:
|
|
return state;
|
|
}
|
|
};
|
|
|
|
export default UserInfo;
|