aboutsummaryrefslogtreecommitdiff
path: root/vnext/src/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'vnext/src/index.js')
-rw-r--r--vnext/src/index.js18
1 files changed, 9 insertions, 9 deletions
diff --git a/vnext/src/index.js b/vnext/src/index.js
index 2299ab56..6f8c1cc0 100644
--- a/vnext/src/index.js
+++ b/vnext/src/index.js
@@ -21,10 +21,10 @@ import { me } from './api';
class App extends React.Component {
constructor(props) {
super(props);
- let params = qs.parse(window.location.search)
+ let params = qs.parse(window.location.search);
if (params.hash) {
localStorage.visitor = JSON.stringify({ uid: 0, hash: params.hash });
- window.history.replaceState({}, document.title, `${window.location.protocol}//${window.location.host}${window.location.pathname}`)
+ window.history.replaceState({}, document.title, `${window.location.protocol}//${window.location.host}${window.location.pathname}`);
}
this.state = {
visitor: localStorage.visitor ? JSON.parse(localStorage.visitor) : {
@@ -43,14 +43,14 @@ class App extends React.Component {
this.ws = new WebSocket(url);
this.ws.onopen = () => {
console.log('online');
- }
+ };
this.ws.onclose = () => {
console.log('offline');
this.ws = false;
setTimeout(function () {
this.initWS();
}, 2000);
- }
+ };
this.ws.onmessage = (msg) => {
if (msg.data == ' ') {
this.ws.send(' ');
@@ -62,7 +62,7 @@ class App extends React.Component {
me().then(visitor => {
this.setState({
visitor: visitor
- })
+ });
});
if (jsonMsg.service) {
return;
@@ -91,11 +91,11 @@ class App extends React.Component {
const { hash, uid } = this.state.visitor;
this.initWS();
if (hash) {
- me().then(visitor => this.auth(visitor))
+ me().then(visitor => this.auth(visitor));
}
}
search = (searchString) => {
- console.log(searchString)
+ console.log(searchString);
}
render() {
const user = this.state.visitor;
@@ -223,12 +223,12 @@ class App extends React.Component {
<Footer />
</React.Fragment>
</Router>
- )
+ );
}
auth = (visitor) => {
this.setState({
visitor: visitor
- })
+ });
}
}