mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Merge pull request #2915 from woocommerce/PCP-4031-remove-woocommerce-navigation-dependency
Remove @woocommerce/navigation dependency (4031)
This commit is contained in:
commit
16ad84c244
4 changed files with 69 additions and 942 deletions
|
@ -1,6 +1,7 @@
|
|||
import { useCallback, useEffect, useState } from '@wordpress/element';
|
||||
import { TabPanel } from '@wordpress/components';
|
||||
import { getQuery, updateQueryString } from '@woocommerce/navigation';
|
||||
|
||||
import { getQuery, updateQueryString } from '../../utils/navigation';
|
||||
|
||||
const TabNavigation = ( { tabs } ) => {
|
||||
const { panel } = getQuery();
|
||||
|
@ -30,7 +31,7 @@ const TabNavigation = ( { tabs } ) => {
|
|||
);
|
||||
|
||||
useEffect( () => {
|
||||
updateQueryString( { panel: activePanel }, '/', getQuery() );
|
||||
updateQueryString( { panel: activePanel } );
|
||||
}, [ activePanel ] );
|
||||
|
||||
return (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue