Merge pull request #2915 from woocommerce/PCP-4031-remove-woocommerce-navigation-dependency

Remove @woocommerce/navigation dependency (4031)
This commit is contained in:
Philipp Stracker 2024-12-13 13:09:00 +01:00 committed by GitHub
commit 16ad84c244
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 69 additions and 942 deletions

View file

@ -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 (