Skip to content

Commit

Permalink
remove unrequired changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgefilipecosta committed Feb 27, 2023
1 parent f3f7766 commit 8c2f80d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,10 @@ export default function NavigationInspector( { onSelect } ) {
onChange={ onChange }
onInput={ onInput }
>
<NavigationMenu onSelect={ onSelect } />
<NavigationMenu
innerBlocks={ publishedInnerBlocks }
onSelect={ onSelect }
/>
</BlockEditorProvider>
) }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
BlockTools,
} from '@wordpress/block-editor';
import { useEffect } from '@wordpress/element';
import { useSelect, useDispatch } from '@wordpress/data';
import { useDispatch } from '@wordpress/data';

/**
* Internal dependencies
Expand Down Expand Up @@ -39,15 +39,7 @@ const ALLOWED_BLOCKS = {
'core/page-list': [ 'core/page-list-item' ],
};

export default function NavigationMenu( { onSelect } ) {
const { clientIdsTree, innerBlocks } = useSelect( ( select ) => {
const { __unstableGetClientIdsTree, getBlocks } =
select( blockEditorStore );
return {
clientIdsTree: __unstableGetClientIdsTree(),
innerBlocks: getBlocks(),
};
} );
export default function NavigationMenu( { innerBlocks, onSelect } ) {
const { updateBlockListSettings } = useDispatch( blockEditorStore );

const { OffCanvasEditor, LeafMoreMenu } = unlock( blockEditorPrivateApis );
Expand All @@ -72,7 +64,7 @@ export default function NavigationMenu( { onSelect } ) {
return (
<>
<OffCanvasEditor
blocks={ clientIdsTree }
blocks={ innerBlocks }
onSelect={ onSelect }
LeafMoreMenu={ LeafMoreMenu }
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ export default function SidebarNavigationScreenNavigationMenus() {
history.push( {
postType: 'page',
postId: attributes.id,
path: '/navigation/single',
} );
}
},
Expand Down

0 comments on commit 8c2f80d

Please sign in to comment.