mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-13 11:12:14 +00:00
Converts some of tgui-panel to typescript Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com> Co-authored-by: Giz <13398309+vinylspiders@users.noreply.github.com>
18 lines
447 B
TypeScript
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];
|