mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 18:16:38 +08:00
♻️ Replace external module with own code
This commit is contained in:
parent
ec1d41261a
commit
6f97015041
1 changed files with 3 additions and 2 deletions
|
@ -1,6 +1,7 @@
|
||||||
import { useCallback, useEffect, useState } from '@wordpress/element';
|
import { useCallback, useEffect, useState } from '@wordpress/element';
|
||||||
import { TabPanel } from '@wordpress/components';
|
import { TabPanel } from '@wordpress/components';
|
||||||
import { getQuery, updateQueryString } from '@woocommerce/navigation';
|
|
||||||
|
import { getQuery, updateQueryString } from '../../utils/navigation';
|
||||||
|
|
||||||
const TabNavigation = ( { tabs } ) => {
|
const TabNavigation = ( { tabs } ) => {
|
||||||
const { panel } = getQuery();
|
const { panel } = getQuery();
|
||||||
|
@ -30,7 +31,7 @@ const TabNavigation = ( { tabs } ) => {
|
||||||
);
|
);
|
||||||
|
|
||||||
useEffect( () => {
|
useEffect( () => {
|
||||||
updateQueryString( { panel: activePanel }, '/', getQuery() );
|
updateQueryString( { panel: activePanel } );
|
||||||
}, [ activePanel ] );
|
}, [ activePanel ] );
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue