Files
CHOMPStation2/tgui/packages/tgui-panel/chat/selectors.ts
CHOMPStation2StaffMirrorBot 56759cb95b [MIRROR] Work on phasing out tgui collections.ts (#10059)
Co-authored-by: ShadowLarkens <shadowlarkens@gmail.com>
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
2025-02-03 11:15:50 +01:00

17 lines
413 B
TypeScript

/**
* @file
* @copyright 2020 Aleksej Komarov
* @license MIT
*/
export const selectChat = (state) => state.chat;
export const selectChatPages = (state) =>
state.chat.pages.map((id: string) => state.chat.pageById[id]);
export const selectCurrentChatPage = (state) =>
state.chat.pageById[state.chat.currentPageId];
export const selectChatPageById = (id: string) => (state) =>
state.chat.pageById[id];