mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-10-06 05:58:11 +08:00
Adopt JS standards once userinfo data is in frontend (#1930)
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
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;
|
||||
Reference in New Issue
Block a user