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

@@ -1,18 +1,9 @@
import { useSubscription } from "@apollo/react-hooks";
import React from "react";
import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
import { MESSAGES_SUBSCRIPTION } from "../../graphql/messages.queries";
import ChatConversationComponent from "./chat-conversation.component";
const mapStateToProps = createStructuredSelector({
//currentUser: selectCurrentUser
});
const mapDispatchToProps = dispatch => ({
//setUserLanguage: language => dispatch(setUserLanguage(language))
});
export function ChatConversationContainer({ conversation }) {
export default function ChatConversationContainer({ conversation }) {
const { loading, error, data } = useSubscription(MESSAGES_SUBSCRIPTION, {
variables: { conversationId: conversation.id }
});
@@ -26,7 +17,3 @@ export function ChatConversationContainer({ conversation }) {
);
}
export default connect(
mapStateToProps,
mapDispatchToProps
)(ChatConversationContainer);