Files
CHOMPStation2/tgui/packages/tgui-panel/chat/selectors.ts
CHOMPStation2 c96b18a2d3 [MIRROR] [TGUI 5.0 Prep] Removes context (#7455)
Co-authored-by: Selis <sirlionfur@hotmail.de>
Co-authored-by: Selis <selis@xynolabs.com>
2024-02-07 23:37:37 +01:00

18 lines
447 B
TypeScript

/**
* @file
* @copyright 2020 Aleksej Komarov
* @license MIT
*/
import { map } from 'common/collections';
export const selectChat = (state) => state.chat;
export const selectChatPages = (state) =>
map((id: string) => 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];