aboutsummaryrefslogtreecommitdiff
path: root/vnext/src/components/Chat.js
diff options
context:
space:
mode:
Diffstat (limited to 'vnext/src/components/Chat.js')
-rw-r--r--vnext/src/components/Chat.js39
1 files changed, 19 insertions, 20 deletions
diff --git a/vnext/src/components/Chat.js b/vnext/src/components/Chat.js
index 0da8dcde..57415d29 100644
--- a/vnext/src/components/Chat.js
+++ b/vnext/src/components/Chat.js
@@ -5,6 +5,7 @@ import moment from 'moment';
import PM from './PM';
import MessageInput from './MessageInput';
+import UserInfo from './UserInfo';
import { getChat, pm } from '../api';
@@ -56,27 +57,25 @@ export default class Chat extends React.Component {
const { chats } = this.state;
const uname = this.props.match.params.user;
return (
- <div className="msgs">
- <article className="msg-cont">
-
- {uname ? (
- <div className="chatroom">
- <ul className="Chat_messages">
- {
- chats.map((chat) =>
- <PM key={moment.utc(chat.timestamp).valueOf()} chat={chat} {...this.props} />
- )
- }
- </ul>
- <MessageInput data={{ mid: 0, timestamp: '0', to: { uname: uname } }} onSend={this.onSend}>
- Reply...
+ <div className="msg-cont">
+ <UserInfo user={uname} />
+ {uname ? (
+ <div className="chatroom">
+ <ul className="Chat_messages">
+ {
+ chats.map((chat) =>
+ <PM key={moment.utc(chat.timestamp).valueOf()} chat={chat} {...this.props} />
+ )
+ }
+ </ul>
+ <MessageInput data={{ mid: 0, timestamp: '0', to: { uname: uname } }} onSend={this.onSend}>
+ Reply...
</MessageInput>
- </div>
- ) : (
- <div className="chatroom no-selection"><p>No chat selected</p></div>
- )
- }
- </article>
+ </div>
+ ) : (
+ <div className="chatroom no-selection"><p>No chat selected</p></div>
+ )
+ }
</div>
);
}