1
0
Fork 0
mirror of https://github.com/plankanban/planka.git synced 2025-07-19 13:19:44 +02:00
planka/client/src/reducers/auth.js

20 lines
422 B
JavaScript
Raw Normal View History

2019-08-31 04:07:25 +05:00
import ActionTypes from '../constants/ActionTypes';
const initialState = {
userId: null,
};
2022-02-09 00:56:01 +05:00
// eslint-disable-next-line default-param-last
2019-08-31 04:07:25 +05:00
export default (state = initialState, { type, payload }) => {
switch (type) {
case ActionTypes.SOCKET_RECONNECT_HANDLE:
case ActionTypes.CORE_INITIALIZE:
2019-08-31 04:07:25 +05:00
return {
...state,
userId: payload.user.id,
};
default:
return state;
}
};