cleanup ids

This commit is contained in:
Paul Sealock 2020-11-18 14:07:05 +13:00
parent b52ba3bdcc
commit 569b016b24
1 changed files with 8 additions and 8 deletions

View File

@ -31,17 +31,17 @@ const NavigationPlugin = () => {
const pages = getPages()
.filter( ( page ) => ! pagesWithoutNavigation.includes( page.path ) )
.map( ( page ) => {
if ( page.path === '/analytics/settings' ) {
const pageWithId = {
...page,
id: `wc-admin&path=${ page.path }`,
};
if ( pageWithId.path === '/analytics/settings' ) {
return {
...page,
id: 'wc-admin&path=' + page.path,
...pageWithId,
breadcrumbs: [ __( 'Analytics', 'woocommerce-admin' ) ],
};
}
return {
...page,
id: 'wc-admin&path=' + page.path,
};
return pageWithId;
} );
const persistedQuery = getPersistedQuery( {} );
return (
@ -58,7 +58,7 @@ const NavigationPlugin = () => {
</WooNavigationItem>
) ) }
{ reports.map( ( item ) => {
const id = 'wc-admin&path=/analytics/' + item.report;
const id = `wc-admin&path=/analytics/${ item.report }`;
return (
<WooNavigationItem item={ id } key={ id }>
<Link