From d752758c7cef7a44a58f744abe9a3c9a0ca1d424 Mon Sep 17 00:00:00 2001 From: Copons Date: Mon, 17 May 2021 14:39:39 +0100 Subject: [PATCH] Simplify post editor list view --- .../secondary-sidebar/list-view-sidebar.js | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/packages/edit-post/src/components/secondary-sidebar/list-view-sidebar.js b/packages/edit-post/src/components/secondary-sidebar/list-view-sidebar.js index 332ba89857358..d7947e437c4c5 100644 --- a/packages/edit-post/src/components/secondary-sidebar/list-view-sidebar.js +++ b/packages/edit-post/src/components/secondary-sidebar/list-view-sidebar.js @@ -12,7 +12,7 @@ import { useInstanceId, useMergeRefs, } from '@wordpress/compose'; -import { useDispatch, useSelect } from '@wordpress/data'; +import { useDispatch } from '@wordpress/data'; import { __ } from '@wordpress/i18n'; import { closeSmall } from '@wordpress/icons'; import { ESCAPE } from '@wordpress/keycodes'; @@ -23,16 +23,6 @@ import { ESCAPE } from '@wordpress/keycodes'; import { store as editPostStore } from '../../store'; export default function ListViewSidebar() { - const { clientIdsTree, selectedBlockClientIds } = useSelect( ( select ) => { - const { - __unstableGetClientIdsTree, - getSelectedBlockClientIds, - } = select( blockEditorStore ); - return { - clientIdsTree: __unstableGetClientIdsTree(), - selectedBlockClientIds: getSelectedBlockClientIds(), - }; - }, [] ); const { setIsListViewOpened } = useDispatch( editPostStore ); const { clearSelectedBlock, selectBlock } = useDispatch( blockEditorStore ); @@ -73,9 +63,7 @@ export default function ListViewSidebar() { ref={ useMergeRefs( [ focusReturnRef, focusOnMountRef ] ) } >