From 7f25b0f261b5a5fc2696054004fb24673375b91b Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 6 Jul 2018 01:32:43 +0300 Subject: Proptypes & eslint --- vnext/src/components/Button.js | 2 +- vnext/src/components/Chat.js | 13 ++++++++++--- vnext/src/components/Contact.js | 5 +++++ vnext/src/components/Contacts.js | 12 ++++++------ vnext/src/components/Feeds.js | 15 ++++++++++++--- vnext/src/components/Footer.js | 4 ++-- vnext/src/components/Header.js | 27 ++++++++++++++++----------- vnext/src/components/Icon.js | 2 +- vnext/src/components/Message.js | 7 ++++--- vnext/src/components/MessageInput.js | 20 ++++++++++---------- vnext/src/components/PM.js | 11 +++++++++-- vnext/src/components/Post.js | 25 +++++++++++++++++-------- vnext/src/components/Settings.js | 10 +++++----- vnext/src/components/Spinner.js | 2 +- vnext/src/components/Thread.js | 23 +++++++++++++++++------ 15 files changed, 116 insertions(+), 62 deletions(-) (limited to 'vnext/src/components') diff --git a/vnext/src/components/Button.js b/vnext/src/components/Button.js index 583f8e4b..656c0426 100644 --- a/vnext/src/components/Button.js +++ b/vnext/src/components/Button.js @@ -1,4 +1,4 @@ -import React from 'react' +import React from 'react'; export default function Button(props) { return ( diff --git a/vnext/src/components/Chat.js b/vnext/src/components/Chat.js index 916de003..dd94dd9e 100644 --- a/vnext/src/components/Chat.js +++ b/vnext/src/components/Chat.js @@ -1,4 +1,6 @@ import React from 'react'; +import ReactRouterPropTypes from 'react-router-prop-types'; +import { UserType } from './Types'; import moment from 'moment'; import PM from './PM'; @@ -14,7 +16,7 @@ export default class Chat extends React.Component { chats: [] }; } - componentWillMount() { + componentDidMount() { this.loadChat(this.props.match.params.user); } @@ -57,14 +59,14 @@ export default class Chat extends React.Component { {uname ? (