Add loading placeholder to orders panel.

This commit is contained in:
Jeff Stieler 2018-11-30 14:47:04 -07:00
parent 4f6346e068
commit 84be615778
1 changed files with 7 additions and 2 deletions

View File

@ -28,7 +28,7 @@ import { formatCurrency, getCurrencyFormatDecimal } from '@woocommerce/currency'
/** /**
* Internal dependencies * Internal dependencies
*/ */
import { ActivityCard } from '../activity-card'; import { ActivityCard, ActivityCardPlaceholder } from '../activity-card';
import ActivityHeader from '../activity-header'; import ActivityHeader from '../activity-header';
import ActivityOutboundLink from '../activity-outbound-link'; import ActivityOutboundLink from '../activity-outbound-link';
import { getOrderRefundTotal } from 'lib/order-values'; import { getOrderRefundTotal } from 'lib/order-values';
@ -75,7 +75,12 @@ function OrdersPanel( { orders, isRequesting } ) {
<ActivityHeader title={ __( 'Orders', 'wc-admin' ) } menu={ menu } /> <ActivityHeader title={ __( 'Orders', 'wc-admin' ) } menu={ menu } />
<Section> <Section>
{ isRequesting ? ( { isRequesting ? (
<p>Loading</p> <ActivityCardPlaceholder
className="woocommerce-order-activity-card"
hasAction
hasDate
lines={ 2 }
/>
) : ( ) : (
<Fragment> <Fragment>
{ orders.map( ( order, i ) => { { orders.map( ( order, i ) => {