diff options
author | 2018-07-06 02:33:27 +0300 | |
---|---|---|
committer | 2023-01-13 10:37:53 +0300 | |
commit | 9ad14ff8f46df2488cef95ea74c0be87bffdcc49 (patch) | |
tree | 28f8765c36c0ae890075120530b6d363666520cd /vnext/src | |
parent | 1b216de47ea5f28e6c4e8a9fb590c0f030f8e647 (diff) |
Update eslint warnings and delete unused file
Diffstat (limited to 'vnext/src')
-rw-r--r-- | vnext/src/index.js | 18 |
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 - }) + }); } } |