woocommerce/plugins/woocommerce-admin/client/wc-api/imports/selectors.js

20 lines
461 B
JavaScript
Raw Normal View History

/** @format */
/**
* Internal dependencies
*/
import { getResourceName } from '../utils';
import { DEFAULT_REQUIREMENT } from '../constants';
const getImportTotals = ( getResource, requireResource ) => (
query = {},
requirement = DEFAULT_REQUIREMENT
) => {
const resourceName = getResourceName( 'import-totals', query );
return requireResource( requirement, resourceName ) || { customers: null, orders: null };
};
export default {
getImportTotals,
};