avoid s/f report and setup wizard pages

This commit is contained in:
Paul Sealock 2020-11-18 14:02:46 +13:00
parent 262737cbb4
commit b52ba3bdcc
1 changed files with 12 additions and 10 deletions

View File

@ -26,21 +26,23 @@ const NavigationPlugin = () => {
if ( ! isWCAdmin( window.location.href ) ) {
return null;
}
const pagesWithoutNavigation = [ '/analytics/:report', '/setup-wizard' ];
const reports = getReports();
const pages = getPages().map( ( page ) => {
if ( page.path === '/analytics/settings' ) {
const pages = getPages()
.filter( ( page ) => ! pagesWithoutNavigation.includes( page.path ) )
.map( ( page ) => {
if ( page.path === '/analytics/settings' ) {
return {
...page,
id: 'wc-admin&path=' + page.path,
breadcrumbs: [ __( 'Analytics', 'woocommerce-admin' ) ],
};
}
return {
...page,
id: 'wc-admin&path=' + page.path,
breadcrumbs: [ __( 'Analytics', 'woocommerce-admin' ) ],
};
}
return {
...page,
id: 'wc-admin&path=' + page.path,
};
} );
} );
const persistedQuery = getPersistedQuery( {} );
return (
<>