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 Devices from './stats/devices' 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 (
) } } forgotten() { return (
) } render() { return (

Analytics for {this.props.site.domain}

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