diff --git a/packages/react-components/src/components/customers/CustomerContainer.tsx b/packages/react-components/src/components/customers/CustomerContainer.tsx index b0bd8411..cc4c720d 100644 --- a/packages/react-components/src/components/customers/CustomerContainer.tsx +++ b/packages/react-components/src/components/customers/CustomerContainer.tsx @@ -125,18 +125,12 @@ export function CustomerContainer(props: Props): JSX.Element { getCustomerPaymentSources({ dispatch, order }) } if ( - config.accessToken && order == null && include == null && includeLoaded == null && withoutIncludes === undefined ) { - async function getCustomerData(): Promise { - await getCustomerOrders({ config, dispatch }) - await getCustomerSubscriptions({ config, dispatch }) - await getCustomerPayments({ config, dispatch }) - } - getCustomerData() + getCustomerPayments({ config, dispatch }) } } }, [config.accessToken, order?.payment_source != null, isGuest]) diff --git a/packages/react-components/src/reducers/CustomerReducer.ts b/packages/react-components/src/reducers/CustomerReducer.ts index a4169f52..79803705 100644 --- a/packages/react-components/src/reducers/CustomerReducer.ts +++ b/packages/react-components/src/reducers/CustomerReducer.ts @@ -445,6 +445,7 @@ export async function getCustomerPayments({ if (owner?.id) { const payments = await sdk.customer_payment_sources.list({ include: ['payment_source'], + sort: { updated_at: 'desc' }, pageNumber, pageSize })