aboutsummaryrefslogtreecommitdiff
path: root/vnext/src/components/Contacts.js
diff options
context:
space:
mode:
Diffstat (limited to 'vnext/src/components/Contacts.js')
-rw-r--r--vnext/src/components/Contacts.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/vnext/src/components/Contacts.js b/vnext/src/components/Contacts.js
index 3f2e7288..84a6ec9f 100644
--- a/vnext/src/components/Contacts.js
+++ b/vnext/src/components/Contacts.js
@@ -1,4 +1,5 @@
import React from 'react';
+
import { getChats } from '../api';
@@ -11,7 +12,7 @@ export default class Contacts extends React.Component {
pms: []
};
}
- componentWillMount() {
+ componentDidMount() {
this.refreshChats();
}
@@ -26,11 +27,10 @@ export default class Contacts extends React.Component {
}
render() {
const { pms } = this.state;
- const user = this.props.visitor;
return (
<div className="msgs">
<div style={wrapperStyle} className="msg-cont">
- <ul style={chatListStyle} ref="chats">
+ <ul style={chatListStyle}>
{
pms && pms.map((chat) =>
<li key={chat.uname} style={chatTitleStyle}>
@@ -48,7 +48,7 @@ export default class Contacts extends React.Component {
const wrapperStyle = {
display: 'flex',
backgroundColor: '#fff'
-}
+};
const chatListStyle = {
boxSizing: 'border-box',
@@ -57,7 +57,7 @@ const chatListStyle = {
alignItems: 'center',
flexDirection: 'column',
width: '100%'
-}
+};
const chatTitleStyle = {
width: '100%',
@@ -66,4 +66,4 @@ const chatTitleStyle = {
background: '#fff',
color: '#222',
borderBottom: '1px solid #eee'
-} \ No newline at end of file
+};