aboutsummaryrefslogtreecommitdiff
path: root/vnext/src/components/Post.js
diff options
context:
space:
mode:
Diffstat (limited to 'vnext/src/components/Post.js')
-rw-r--r--vnext/src/components/Post.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/vnext/src/components/Post.js b/vnext/src/components/Post.js
index fd577603..7bde7432 100644
--- a/vnext/src/components/Post.js
+++ b/vnext/src/components/Post.js
@@ -1,4 +1,5 @@
import React from 'react';
+import * as qs from 'query-string';
import MessageInput from './MessageInput';
@@ -7,9 +8,10 @@ import { post } from '../api';
export default class Post extends React.Component {
constructor(props) {
super(props)
+ let params = qs.parse(window.location.search);
this.state = {
attach: '',
- body: ''
+ body: params.body || ''
}
this.fileinput = React.createRef();
console.log(props)
@@ -39,7 +41,7 @@ export default class Post extends React.Component {
render() {
return (
<article>
- <MessageInput rows="7" data={{ mid: 0, timestamp: "0" }} onSend={this.postMessage}>
+ <MessageInput rows="7" text={this.state.body} data={{ mid: 0, timestamp: "0" }} onSend={this.postMessage}>
*weather It's very cold today!
</MessageInput>
</article>