From 9ad14ff8f46df2488cef95ea74c0be87bffdcc49 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 6 Jul 2018 02:33:27 +0300 Subject: Update eslint warnings and delete unused file --- vnext/src/index.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'vnext/src') 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 {