woocommerce/plugins/woocommerce-admin/client/analytics/report/index.js

31 lines
557 B
JavaScript

/** @format */
/**
* External dependencies
*/
import { Component } from '@wordpress/element';
import PropTypes from 'prop-types';
/**
* Internal dependencies
*/
import ExampleReport from './example';
import RevenueReport from './revenue';
class Report extends Component {
render() {
const { params } = this.props;
switch ( params.report ) {
case 'revenue':
return <RevenueReport { ...this.props } />;
default:
return <ExampleReport />;
}
}
}
Report.propTypes = {
params: PropTypes.object.isRequired,
};
export default Report;