/** * External dependencies */ import { useContext } from '@wordpress/element'; import { __ } from '@wordpress/i18n'; import classnames from 'classnames'; import { SummaryNumber, SummaryNumberPlaceholder, } from '@woocommerce/components'; import { getPersistedQuery } from '@woocommerce/navigation'; /** * Internal dependencies */ import withSelect from '../../wc-api/with-select'; import { recordEvent } from '../../lib/tracks'; import { CurrencyContext } from '../../lib/currency-context'; import { getIndicatorData, getIndicatorValues, } from '../../dashboard/store-performance/utils'; export const StatsList = ( { stats, primaryData, secondaryData, primaryRequesting, secondaryRequesting, primaryError, secondaryError, query, } ) => { const { formatAmount, getCurrencyConfig } = useContext( CurrencyContext ); if ( primaryError || secondaryError ) { return null; } const persistedQuery = getPersistedQuery( query ); const currency = getCurrencyConfig(); return (