From 3c61705c062234adc954c8a42e3ea53ff1007bb6 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 28 Jun 2018 13:28:02 +0300 Subject: MessageInput in Post --- vnext/src/components/Chat.js | 10 ++++++---- vnext/src/components/MessageInput.js | 7 ++++--- vnext/src/components/Post.js | 30 ++++++++++-------------------- vnext/src/components/Thread.js | 4 ++-- 4 files changed, 22 insertions(+), 29 deletions(-) diff --git a/vnext/src/components/Chat.js b/vnext/src/components/Chat.js index c7a5c3ff..fa187f42 100644 --- a/vnext/src/components/Chat.js +++ b/vnext/src/components/Chat.js @@ -35,9 +35,9 @@ export default class Chat extends React.Component { onSend = (template) => { pm(template.to.uname, template.body) - .then(res => { - this.loadChat(this.props.match.params.user); - }).catch(console.log) + .then(res => { + this.loadChat(this.props.match.params.user); + }).catch(console.log) } render() { @@ -56,7 +56,9 @@ export default class Chat extends React.Component { ) } - + + Reply... + ) : (

No chat selected

diff --git a/vnext/src/components/MessageInput.js b/vnext/src/components/MessageInput.js index 21495dd7..52ad7bc6 100644 --- a/vnext/src/components/MessageInput.js +++ b/vnext/src/components/MessageInput.js @@ -84,7 +84,7 @@ export default class MessageInput extends React.Component { -
- -

- - +
+ + *weather It's very cold today! + +
); } } diff --git a/vnext/src/components/Thread.js b/vnext/src/components/Thread.js index e9f08ccb..d25ca228 100644 --- a/vnext/src/components/Thread.js +++ b/vnext/src/components/Thread.js @@ -74,7 +74,7 @@ export default class Thread extends React.Component { { msg.mid ? ( - {this.state.active === (msg.rid || 0) && } + {this.state.active === (msg.rid || 0) && Write a comment...} ) : ( @@ -126,7 +126,7 @@ export default class Thread extends React.Component { this.props.visitor.uid > 0 ? ( {this.state.active === msg.rid || } - {this.state.active === msg.rid && } + {this.state.active === msg.rid && Write a comment...} ) : ( -- cgit v1.2.3