PromucFlow_constructor/app/client/src/constants/WebsocketConstants.tsx
Pranav Kanade a1488a73f6
refactor: client side rts (#7837)
* moved constants to a proper files

* added new action constants

* updated websocket reducers and actions

* updated websocket saga to handle proper socket events

* updated initialization

* updated multi pointer arena + realtime app editors components

* minor feedback update

* updated events list by socket level

* removed e.persist

* passing socket obj rather than just id
2021-10-01 16:44:19 +00:00

23 lines
499 B
TypeScript

export const WEBSOCKET_EVENTS = {
RECONNECT: "RECONNECT",
DISCONNECTED: "DISCONNECTED",
CONNECTED: "CONNECTED",
};
export const reconnectWebsocketEvent = () => ({
type: WEBSOCKET_EVENTS.RECONNECT,
});
export const websocketDisconnectedEvent = () => ({
type: WEBSOCKET_EVENTS.DISCONNECTED,
});
export const websocketConnectedEvent = () => ({
type: WEBSOCKET_EVENTS.CONNECTED,
});
export const RTS_BASE_PATH = "/rts";
export const WEBSOCKET_NAMESPACE = {
PAGE_EDIT: "/page/edit",
};