jiti-meet/react/features/chat/components/native/Chat.js

45 lines
1.2 KiB
JavaScript
Raw Normal View History

// @flow
import React from 'react';
import { translate } from '../../../base/i18n';
2020-04-01 15:14:02 +00:00
import { JitsiModal } from '../../../base/modal';
2019-03-21 16:38:29 +00:00
import { connect } from '../../../base/redux';
2020-04-01 15:14:02 +00:00
import { CHAT_VIEW_MODAL_ID } from '../../constants';
import AbstractChat, {
_mapDispatchToProps,
2020-04-01 15:14:02 +00:00
_mapStateToProps,
type Props
} from '../AbstractChat';
import ChatInputBar from './ChatInputBar';
import MessageContainer from './MessageContainer';
2019-10-07 12:35:04 +00:00
import MessageRecipient from './MessageRecipient';
/**
* Implements a React native component that renders the chat window (modal) of
* the mobile client.
*/
class Chat extends AbstractChat<Props> {
/**
* Implements React's {@link Component#render()}.
*
* @inheritdoc
*/
render() {
return (
2020-04-01 15:14:02 +00:00
<JitsiModal
headerProps = {{
headerLabelKey: 'chat.title'
}}
2020-04-01 15:14:02 +00:00
modalId = { CHAT_VIEW_MODAL_ID }>
<MessageContainer messages = { this.props._messages } />
<MessageRecipient />
<ChatInputBar onSend = { this.props._onSendMessage } />
2020-04-01 15:14:02 +00:00
</JitsiModal>
);
}
2019-10-15 14:08:23 +00:00
}
export default translate(connect(_mapStateToProps, _mapDispatchToProps)(Chat));