aboutsummaryrefslogtreecommitdiff
path: root/vnext/src/components/Contacts.js
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-07-06 01:32:43 +0300
committerGravatar Vitaly Takmazov2023-01-13 10:37:53 +0300
commit7f25b0f261b5a5fc2696054004fb24673375b91b (patch)
tree38ee591e176b4799e39eff7a16f1950e017e7bb4 /vnext/src/components/Contacts.js
parent88732ba8c06c23a93f7248b6eabc182f38be3d33 (diff)
Proptypes & eslint
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
+};