aboutsummaryrefslogtreecommitdiff
path: root/vnext/src/components/Thread.js
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-06-16 21:37:35 +0300
committerGravatar Vitaly Takmazov2023-01-13 10:37:52 +0300
commit9177719daf40ca63b73f78602283902b3c615bae (patch)
tree67d5abf09069c62b77f1d27c2f5500dcdd348a05 /vnext/src/components/Thread.js
parent445f9d694df84bf6a4aedbeae47f8df7baa55c29 (diff)
real login
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()