cleanup ids
This commit is contained in:
parent
b52ba3bdcc
commit
569b016b24
|
@ -31,17 +31,17 @@ const NavigationPlugin = () => {
|
||||||
const pages = getPages()
|
const pages = getPages()
|
||||||
.filter( ( page ) => ! pagesWithoutNavigation.includes( page.path ) )
|
.filter( ( page ) => ! pagesWithoutNavigation.includes( page.path ) )
|
||||||
.map( ( page ) => {
|
.map( ( page ) => {
|
||||||
if ( page.path === '/analytics/settings' ) {
|
const pageWithId = {
|
||||||
|
...page,
|
||||||
|
id: `wc-admin&path=${ page.path }`,
|
||||||
|
};
|
||||||
|
if ( pageWithId.path === '/analytics/settings' ) {
|
||||||
return {
|
return {
|
||||||
...page,
|
...pageWithId,
|
||||||
id: 'wc-admin&path=' + page.path,
|
|
||||||
breadcrumbs: [ __( 'Analytics', 'woocommerce-admin' ) ],
|
breadcrumbs: [ __( 'Analytics', 'woocommerce-admin' ) ],
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
return {
|
return pageWithId;
|
||||||
...page,
|
|
||||||
id: 'wc-admin&path=' + page.path,
|
|
||||||
};
|
|
||||||
} );
|
} );
|
||||||
const persistedQuery = getPersistedQuery( {} );
|
const persistedQuery = getPersistedQuery( {} );
|
||||||
return (
|
return (
|
||||||
|
@ -58,7 +58,7 @@ const NavigationPlugin = () => {
|
||||||
</WooNavigationItem>
|
</WooNavigationItem>
|
||||||
) ) }
|
) ) }
|
||||||
{ reports.map( ( item ) => {
|
{ reports.map( ( item ) => {
|
||||||
const id = 'wc-admin&path=/analytics/' + item.report;
|
const id = `wc-admin&path=/analytics/${ item.report }`;
|
||||||
return (
|
return (
|
||||||
<WooNavigationItem item={ id } key={ id }>
|
<WooNavigationItem item={ id } key={ id }>
|
||||||
<Link
|
<Link
|
||||||
|
|
Loading…
Reference in New Issue