You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
900 B
TypeScript
24 lines
900 B
TypeScript
import { connect } from 'react-redux';
|
|
import { mapDispatchToProps } from '../actions';
|
|
import { SessionConversation } from '../../components/session/SessionConversation';
|
|
import { StateType } from '../reducer';
|
|
|
|
import { getSessionConversationInfo } from '../selectors/conversations';
|
|
|
|
const mapStateToProps = (state: StateType) => {
|
|
//const conversationInfo = getSessionConversationInfo(state);
|
|
|
|
// console.log(`[vince] stateToProps from SessionConversation:`, conversationInfo);
|
|
// console.log(`[vince] stateToProps from SessionConversation:`, state);
|
|
|
|
// You only want to rerender SessionConversation if the CURRENT conversation updates
|
|
// Use SelectedConversationChangedActionType FROM actions.ts
|
|
|
|
return {
|
|
conversations: state.conversations,
|
|
}
|
|
};
|
|
|
|
const smart = connect(mapStateToProps, mapDispatchToProps);
|
|
export const SmartSessionConversation = smart(SessionConversation);
|