diff --git a/client/src/components/chat-conversation-title/chat-conversation-title.component.jsx b/client/src/components/chat-conversation-title/chat-conversation-title.component.jsx index 1503bf46f..9fb9776a3 100644 --- a/client/src/components/chat-conversation-title/chat-conversation-title.component.jsx +++ b/client/src/components/chat-conversation-title/chat-conversation-title.component.jsx @@ -1,14 +1,31 @@ -import { Space } from "antd"; +import { Space, Button, Col } from "antd"; import React from "react"; import PhoneNumberFormatter from "../../utils/PhoneFormatter"; import ChatArchiveButton from "../chat-archive-button/chat-archive-button.component"; import ChatConversationTitleTags from "../chat-conversation-title-tags/chat-conversation-title-tags.component"; import ChatLabelComponent from "../chat-label/chat-label.component"; import ChatTagRoContainer from "../chat-tag-ro/chat-tag-ro.container"; +import { connect } from "react-redux"; +import { setSelectedConversation } from "../../redux/messaging/messaging.actions"; +import { LeftOutlined } from "@ant-design/icons"; -export default function ChatConversationTitle({ conversation }) { +const mapDispatchToProps = (dispatch) => ({ + setSelectedConversation: (conversationId) => + dispatch(setSelectedConversation(conversationId)), +}); + +function ChatConversationTitle({ conversation, setSelectedConversation }) { return ( + + + {conversation && conversation.phone_num} @@ -23,3 +40,5 @@ export default function ChatConversationTitle({ conversation }) { ); } + +export default connect(null, mapDispatchToProps)(ChatConversationTitle); diff --git a/client/src/components/chat-popup/chat-popup.component.jsx b/client/src/components/chat-popup/chat-popup.component.jsx index 1c80d7c4c..45b2a332f 100644 --- a/client/src/components/chat-popup/chat-popup.component.jsx +++ b/client/src/components/chat-popup/chat-popup.component.jsx @@ -112,7 +112,7 @@ export function ChatPopupComponent({ /> - + {loading ? ( ) : (