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

43 lines
895 B
JavaScript

/** @format */
/**
* External dependencies
*/
import { Component, Fragment } from '@wordpress/element';
import PropTypes from 'prop-types';
/**
* WooCommerce dependencies
*/
import { ReportFilters } from '@woocommerce/components';
/**
* Internal dependencies
*/
import { advancedFilters, filters } from './config';
import OrdersReportChart from './chart';
import OrdersReportTable from './table';
export default class OrdersReport extends Component {
render() {
const { path, query } = this.props;
return (
<Fragment>
<ReportFilters
query={ query }
path={ path }
filters={ filters }
advancedFilters={ advancedFilters }
/>
<OrdersReportChart query={ query } path={ path } />
<OrdersReportTable query={ query } />
</Fragment>
);
}
}
OrdersReport.propTypes = {
path: PropTypes.string.isRequired,
query: PropTypes.object.isRequired,
};