|
|
|
@ -4,7 +4,6 @@ import React from 'react'; |
|
|
|
|
|
|
|
|
|
import { translate } from '../../../base/i18n'; |
|
|
|
|
import { connect } from '../../../base/redux'; |
|
|
|
|
import { toggleChat } from '../../actions.web'; |
|
|
|
|
import AbstractChat, { |
|
|
|
|
_mapStateToProps, |
|
|
|
|
type Props |
|
|
|
@ -52,7 +51,6 @@ class Chat extends AbstractChat<Props> { |
|
|
|
|
// Bind event handlers so they are only bound once for every instance.
|
|
|
|
|
this._renderPanelContent = this._renderPanelContent.bind(this); |
|
|
|
|
this._onChatInputResize = this._onChatInputResize.bind(this); |
|
|
|
|
this._onToggleChat = this._onToggleChat.bind(this); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
@ -137,9 +135,7 @@ class Chat extends AbstractChat<Props> { |
|
|
|
|
*/ |
|
|
|
|
_renderChatHeader() { |
|
|
|
|
return ( |
|
|
|
|
<Header |
|
|
|
|
className = 'chat-header' |
|
|
|
|
onCancel = { this._onToggleChat } /> |
|
|
|
|
<Header className = 'chat-header' /> |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -203,18 +199,6 @@ class Chat extends AbstractChat<Props> { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
_onSendMessage: (string) => void; |
|
|
|
|
|
|
|
|
|
_onToggleChat: () => void; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Toggles the chat window. |
|
|
|
|
* |
|
|
|
|
* @returns {Function} |
|
|
|
|
*/ |
|
|
|
|
_onToggleChat() { |
|
|
|
|
this.props.dispatch(toggleChat()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
export default translate(connect(_mapStateToProps)(Chat)); |
|
|
|
|