| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | 1x 2x 2x 1x 1x 1x | import { ActionNames } from '../actions';
import { LoginActions } from '../actions/login';
import { UserInfo } from '../userProfile';
export function user(Istate: UserInfo = null, action: LoginActions): UserInfo {
if (action.type === ActionNames.login.logOut) {
return null;
}
Eif (action.type === ActionNames.login.getUserResult) {
return action.user;
}
return state;
}
|