Started boilerplate getSessionConversationInfo

pull/1102/head
Vincent 5 years ago
parent e34ed37cdb
commit a90cae4ac4

@ -60,6 +60,8 @@
conversation => conversation.cachedProps conversation => conversation.cachedProps
); );
console.log(conversationId);
const initialState = { const initialState = {
conversations: { conversations: {
conversationLookup: Signal.Util.makeLookup(conversations, 'id'), conversationLookup: Signal.Util.makeLookup(conversations, 'id'),

@ -169,6 +169,13 @@ export const getLeftPaneLists = createSelector(
_getLeftPaneLists _getLeftPaneLists
); );
export const getSessionConversationInfo = createSelector(
getConversationLookup,
getConversationComparator,
getSelectedConversation,
_getLeftPaneLists
);
export const getMe = createSelector( export const getMe = createSelector(
[getConversationLookup, getUserNumber], [getConversationLookup, getUserNumber],
(lookup: ConversationLookupType, ourNumber: string): ConversationType => { (lookup: ConversationLookupType, ourNumber: string): ConversationType => {

@ -3,10 +3,10 @@ import { mapDispatchToProps } from '../actions';
import { SessionConversation } from '../../components/session/SessionConversation'; import { SessionConversation } from '../../components/session/SessionConversation';
import { StateType } from '../reducer'; import { StateType } from '../reducer';
import { getLeftPaneLists } from '../selectors/conversations'; import { getSessionConversationInfo } from '../selectors/conversations';
const mapStateToProps = (state: StateType) => { const mapStateToProps = (state: StateType) => {
const lists = getLeftPaneLists(state); const lists = getSessionConversationList(state);
return lists; return lists;
}; };

Loading…
Cancel
Save