mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 19:22:56 +00:00
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];
|