diff --git a/changelog/add-8346-deposits-overview-docs b/changelog/add-8346-deposits-overview-docs new file mode 100644 index 00000000000..0de31df6a42 --- /dev/null +++ b/changelog/add-8346-deposits-overview-docs @@ -0,0 +1,4 @@ +Significance: minor +Type: update + +Updated deposits API documentation to add default_external_accounts element diff --git a/changelog/fix-6527-improved-navigation-time b/changelog/fix-6527-improved-navigation-time new file mode 100644 index 00000000000..6d06baa4c1a --- /dev/null +++ b/changelog/fix-6527-improved-navigation-time @@ -0,0 +1,4 @@ +Significance: patch +Type: fix + +Used client side navigation to improve the UX for "View Deposit History" diff --git a/client/components/deposits-overview/index.tsx b/client/components/deposits-overview/index.tsx index d7efd069231..23ce733bf50 100644 --- a/client/components/deposits-overview/index.tsx +++ b/client/components/deposits-overview/index.tsx @@ -10,6 +10,7 @@ import { CardHeader, } from '@wordpress/components'; import { __ } from '@wordpress/i18n'; +import { getHistory } from '@woocommerce/navigation'; /** * Internal dependencies. @@ -80,6 +81,18 @@ const DepositsOverview: React.FC = () => { externalAccount.status === 'errored' ) ?? false; + const navigateToDepositsHistory = () => { + recordEvent( 'wcpay_overview_deposits_view_history_click' ); + + const history = getHistory(); + history.push( + getAdminUrl( { + page: 'wc-admin', + path: '/payments/deposits', + } ) + ); + }; + // Show a loading state if the page is still loading. if ( isLoading ) { return ( @@ -189,15 +202,7 @@ const DepositsOverview: React.FC = () => { { hasRecentDeposits && (