IO-2317 Messaging screen on mobile
This commit is contained in:
@@ -1,14 +1,31 @@
|
|||||||
import { Space } from "antd";
|
import { Space, Button, Col } from "antd";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import PhoneNumberFormatter from "../../utils/PhoneFormatter";
|
import PhoneNumberFormatter from "../../utils/PhoneFormatter";
|
||||||
import ChatArchiveButton from "../chat-archive-button/chat-archive-button.component";
|
import ChatArchiveButton from "../chat-archive-button/chat-archive-button.component";
|
||||||
import ChatConversationTitleTags from "../chat-conversation-title-tags/chat-conversation-title-tags.component";
|
import ChatConversationTitleTags from "../chat-conversation-title-tags/chat-conversation-title-tags.component";
|
||||||
import ChatLabelComponent from "../chat-label/chat-label.component";
|
import ChatLabelComponent from "../chat-label/chat-label.component";
|
||||||
import ChatTagRoContainer from "../chat-tag-ro/chat-tag-ro.container";
|
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 (
|
return (
|
||||||
<Space wrap>
|
<Space wrap>
|
||||||
|
<Col sm={0}>
|
||||||
|
<Button
|
||||||
|
onClick={() => setSelectedConversation()}
|
||||||
|
size="small"
|
||||||
|
type="text"
|
||||||
|
>
|
||||||
|
<LeftOutlined />
|
||||||
|
</Button>
|
||||||
|
</Col>
|
||||||
<PhoneNumberFormatter>
|
<PhoneNumberFormatter>
|
||||||
{conversation && conversation.phone_num}
|
{conversation && conversation.phone_num}
|
||||||
</PhoneNumberFormatter>
|
</PhoneNumberFormatter>
|
||||||
@@ -23,3 +40,5 @@ export default function ChatConversationTitle({ conversation }) {
|
|||||||
</Space>
|
</Space>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default connect(null, mapDispatchToProps)(ChatConversationTitle);
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ export function ChatPopupComponent({
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<Row gutter={[8, 8]} className="chat-popup-content">
|
<Row gutter={[8, 8]} className="chat-popup-content">
|
||||||
<Col span={8}>
|
<Col span={8} sm={8} xs={selectedConversation && 0}>
|
||||||
{loading ? (
|
{loading ? (
|
||||||
<LoadingSpinner />
|
<LoadingSpinner />
|
||||||
) : (
|
) : (
|
||||||
|
|||||||
Reference in New Issue
Block a user