BOD-14 Cleanup and re-org of some components for messaging.

This commit is contained in:
Patrick Fic
2020-03-27 16:33:31 -07:00
parent f80f96f3df
commit c0be80b42e
11 changed files with 123 additions and 155 deletions

View File

@@ -0,0 +1,30 @@
import { Affix } from "antd";
import React from "react";
import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
import { selectConversations } from "../../redux/messaging/messaging.selectors";
import ChatConversationContainer from "../chat-conversation/chat-conversation.container";
import ChatMessagesButton from "../chat-messages-button/chat-messages-button.component";
const mapStateToProps = createStructuredSelector({
activeConversations: selectConversations
});
export function ChatOverlayContainer({ activeConversations }) {
return (
<Affix offsetBottom={0}>
<ChatMessagesButton />
{activeConversations
? activeConversations.map(conversation => (
<ChatConversationContainer
conversation={conversation}
key={conversation.id}
/>
))
: null}
</Affix>
);
}
export default connect(mapStateToProps, null)(ChatOverlayContainer);