Files
GS13NG/tgui/packages/tgui-panel/chat/selectors.js
2020-09-02 17:52:47 +03:00

22 lines
441 B
JavaScript

/**
* @file
* @copyright 2020 Aleksej Komarov
* @license MIT
*/
import { map } from 'common/collections';
export const selectChat = state => state.chat;
export const selectChatPages = state => (
map(id => state.chat.pageById[id])(state.chat.pages)
);
export const selectCurrentChatPage = state => (
state.chat.pageById[state.chat.currentPageId]
);
export const selectChatPageById = id => state => (
state.chat.pageById[id]
);