Files
planka/client/src/actions/socket.js
Maksim Eltyshev 3f8216dca8 ref: Refactoring
2022-08-04 13:31:14 +02:00

59 lines
967 B
JavaScript

import ActionTypes from '../constants/ActionTypes';
const handleSocketDisconnect = () => ({
type: ActionTypes.SOCKET_DISCONNECT_HANDLE,
payload: {},
});
const handleSocketReconnect = (
user,
board,
users,
projects,
projectManagers,
boards,
boardMemberships,
labels,
lists,
cards,
cardMemberships,
cardLabels,
tasks,
attachments,
activities,
notifications,
) => ({
type: ActionTypes.SOCKET_RECONNECT_HANDLE,
payload: {
user,
board,
users,
projects,
projectManagers,
boards,
boardMemberships,
labels,
lists,
cards,
cardMemberships,
cardLabels,
tasks,
attachments,
activities,
notifications,
},
});
handleSocketReconnect.fetchCore = (currentUserId, currentBoardId) => ({
type: ActionTypes.SOCKET_RECONNECT_HANDLE__CORE_FETCH,
payload: {
currentUserId,
currentBoardId,
},
});
export default {
handleSocketDisconnect,
handleSocketReconnect,
};