import React from 'react'; import { withRouter } from 'react-router-dom' import Datepicker from './datepicker' import Filters from './filters' import CurrentVisitors from './stats/current-visitors' import VisitorGraph from './stats/visitor-graph' import Referrers from './stats/referrers' import Pages from './stats/pages' import Countries from './stats/countries' import Browsers from './stats/browsers' import OperatingSystems from './stats/operating-systems' import ScreenSizes from './stats/screen-sizes' import Conversions from './stats/conversions' import {parseQuery} from './query' class Stats extends React.Component { constructor(props) { super(props) this.state = {query: parseQuery(props.location.search, this.props.site)} } componentDidUpdate(prevProps) { if (prevProps.location.search !== this.props.location.search) { this.setState({query: parseQuery(this.props.location.search, this.props.site)}) } } renderConversions() { if (this.props.site.hasGoals) { return (
) } } render() { return (

Analytics for {this.props.site.domain}

{ this.renderConversions() }
) } } export default withRouter(Stats)