aboutsummaryrefslogtreecommitdiff
path: root/vnext/src/components
diff options
context:
space:
mode:
Diffstat (limited to 'vnext/src/components')
-rw-r--r--vnext/src/components/Chat.js39
-rw-r--r--vnext/src/components/UserInfo.js2
2 files changed, 20 insertions, 21 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>
);
}
diff --git a/vnext/src/components/UserInfo.js b/vnext/src/components/UserInfo.js
index e92ccfd5..0a13f050 100644
--- a/vnext/src/components/UserInfo.js
+++ b/vnext/src/components/UserInfo.js
@@ -41,7 +41,7 @@ export default function UserInfo(props) {
{
user.uid > 0 &&
<>
- <Link to="/pm">
+ <Link to={`/pm/${user.uname}`}>
<Icon name="ei-envelope" size="s" />
<span className="desktop">PM</span>
</Link>