mirror of
https://github.com/plankanban/planka.git
synced 2025-12-19 01:12:02 +03:00
20 lines
422 B
JavaScript
Executable File
20 lines
422 B
JavaScript
Executable File
import ActionTypes from '../constants/ActionTypes';
|
|
|
|
const initialState = {
|
|
userId: null,
|
|
};
|
|
|
|
// eslint-disable-next-line default-param-last
|
|
export default (state = initialState, { type, payload }) => {
|
|
switch (type) {
|
|
case ActionTypes.SOCKET_RECONNECT_HANDLE:
|
|
case ActionTypes.CORE_INITIALIZE:
|
|
return {
|
|
...state,
|
|
userId: payload.user.id,
|
|
};
|
|
default:
|
|
return state;
|
|
}
|
|
};
|