aboutsummaryrefslogtreecommitdiff
path: root/vnext/src/components/Thread.js
diff options
context:
space:
mode:
Diffstat (limited to 'vnext/src/components/Thread.js')
-rw-r--r--vnext/src/components/Thread.js12
1 files changed, 9 insertions, 3 deletions
diff --git a/vnext/src/components/Thread.js b/vnext/src/components/Thread.js
index 5393d7d3..1a3ac862 100644
--- a/vnext/src/components/Thread.js
+++ b/vnext/src/components/Thread.js
@@ -1,5 +1,6 @@
import 'whatwg-fetch';
import React from 'react';
+import * as qs from 'query-string';
import Message from './Message';
import Spinner from './Spinner';
@@ -8,8 +9,7 @@ export default class Thread extends React.Component {
constructor(props) {
super(props);
this.state = {
- replies: [],
- loading: false
+ replies: []
};
}
componentDidMount() {
@@ -18,7 +18,13 @@ export default class Thread extends React.Component {
loadReplies() {
this.setState({ replies: []})
const { mid } = this.props.match.params;
- const url = `https://api.juick.com/thread?mid=${mid}`;
+ let params = {
+ mid: mid
+ }
+ if (this.props.visitor && this.props.visitor.hash) {
+ params.hash = this.props.visitor.hash
+ };
+ const url = `https://api.juick.com/thread?${qs.stringify(params)}`;
fetch(url)
.then(response => {
return response.json()