mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-18 15:13:21 +08:00
11 lines
270 B
JavaScript
11 lines
270 B
JavaScript
import { SET_CURRENT_USER } from "../../app/action_types";
|
|
|
|
export function currentUser(
|
|
state = { id: 0, fullName: "", avatarPath: "" },
|
|
action
|
|
) {
|
|
if (action.type === SET_CURRENT_USER) {
|
|
return Object.assign({}, state, action.payload);
|
|
}
|
|
return state;
|
|
}
|