import React from 'react'; //panels import CommonLinks from '../panels/common_links.jsx'; import StatisticsPanel from '../panels/statistics.jsx'; class Statistics extends React.Component { constructor(props) { super(props); this.state = { warning: '', //TODO: unified warning? fetch: null }; } componentDidUpdate(prevProps, prevState, snapshot) { this.state.fetch(); } render() { let warningStyle = { display: this.state.warning.length > 0 ? 'flex' : 'none' }; return (

{this.state.warning}

Game Statistics

this.setState({ fetch: fn }) } />
); } setWarning(s) { this.setState({ warning: s }); } }; export default Statistics;