Skip to content

Commit

Permalink
Navigation: Try removing "Add all pages" from placeholder.
Browse files Browse the repository at this point in the history
  • Loading branch information
jasmussen committed Jan 26, 2022
1 parent ce179fc commit c8520cb
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions packages/block-library/src/navigation/edit/placeholder/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/**
* WordPress dependencies
*/
import { createBlock } from '@wordpress/blocks';
import {
Placeholder,
Button,
Expand Down Expand Up @@ -124,7 +123,6 @@ export default function NavigationPlaceholder( {
isResolvingPages,
menus,
isResolvingMenus,
hasPages,
hasMenus,
} = useNavigationEntities();

Expand All @@ -134,11 +132,6 @@ export default function NavigationPlaceholder( {
onFinishMenuCreation( [] );
};

const onCreateAllPages = () => {
const block = [ createBlock( 'core/page-list' ) ];
onFinishMenuCreation( block );
};

const { navigationMenus } = useNavigationMenu();

const hasNavigationMenus = !! navigationMenus?.length;
Expand Down Expand Up @@ -181,18 +174,6 @@ export default function NavigationPlaceholder( {
<hr />
</>
) : undefined }
{ canUserCreateNavigation && hasPages ? (
<>
<Button
variant="tertiary"
onClick={ onCreateAllPages }
>
{ __( 'Add all pages' ) }
</Button>
<hr />
</>
) : undefined }

{ canUserCreateNavigation && (
<Button
variant="tertiary"
Expand Down

0 comments on commit c8520cb

Please sign in to comment.