Commit fb172b85 authored by HJISTC's avatar HJISTC

Warning free

parent 2308cae2
...@@ -6,7 +6,7 @@ import { Layout } from 'antd' ...@@ -6,7 +6,7 @@ import { Layout } from 'antd'
import Nav from './Nav' import Nav from './Nav'
const { Content, Footer, Header } = Layout const { Header } = Layout
export default class About extends React.Component { export default class About extends React.Component {
constructor(props) { constructor(props) {
...@@ -14,8 +14,8 @@ export default class About extends React.Component { ...@@ -14,8 +14,8 @@ export default class About extends React.Component {
this.state = { this.state = {
isMobile: false, isMobile: false,
stats: { signups: null, online: null }, //stats: { signups: null, online: null },
latest: { win32: {}, drawin: {} }, //latest: { win32: {}, drawin: {} },
platform: navigator.platform.match(/Mac/i) ? 'drawin' : 'win32' platform: navigator.platform.match(/Mac/i) ? 'drawin' : 'win32'
} }
} }
...@@ -30,25 +30,26 @@ export default class About extends React.Component { ...@@ -30,25 +30,26 @@ export default class About extends React.Component {
} }
}) })
const initState = { // const initState = {
stats: { // stats: {
signups: await this.get_stats_signups(), // signups: await this.get_stats_signups(),
online: await this.get_stats_online() // online: await this.get_stats_online()
} // }
} // }
const initLatest = {
latest: { // const initLatest = {
win32: await this.get_latest_win32(), // latest: {
drawin: await this.get_latest_drawin() // win32: await this.get_latest_win32(),
} // drawin: await this.get_latest_drawin()
} // }
// }
this.setState(initState) // this.setState(initState)
this.setState(initLatest) // this.setState(initLatest)
} }
render() { render() {
const { latest, isMobile, stats } = this.state const { isMobile } = this.state // const { latest, isMobile, stats } = this.state
return ( return (
<Layout> <Layout>
{!isMobile ? {!isMobile ?
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment