From de800b9614bee4838cc851b946274b77c2170c3f Mon Sep 17 00:00:00 2001 From: Ben Dwyer Date: Tue, 10 Sep 2024 15:26:50 +0100 Subject: [PATCH] revert unused changes --- .../src/components/preferences-modal/index.js | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/packages/editor/src/components/preferences-modal/index.js b/packages/editor/src/components/preferences-modal/index.js index 36ed1f0eee835a..a8cfd8245522cd 100644 --- a/packages/editor/src/components/preferences-modal/index.js +++ b/packages/editor/src/components/preferences-modal/index.js @@ -11,7 +11,6 @@ import { privateApis as preferencesPrivateApis, } from '@wordpress/preferences'; import { store as interfaceStore } from '@wordpress/interface'; -import { store as blockEditorStore } from '@wordpress/block-editor'; /** * Internal dependencies @@ -27,6 +26,7 @@ import PageAttributesCheck from '../page-attributes/check'; import PostTypeSupportCheck from '../post-type-support-check'; import { store as editorStore } from '../../store'; import { unlock } from '../../lock-unlock'; +import { useStartPatterns } from '../start-page-options'; const { PreferencesModal, @@ -35,17 +35,6 @@ const { PreferenceToggleControl, } = unlock( preferencesPrivateApis ); -function useStartPatterns() { - // A pattern is a start pattern if it includes 'core/post-content' in its blockTypes, - // and it has no postTypes declared and the current post type is page or if - // the current post type is part of the postTypes declared. - return useSelect( ( select ) => - select( blockEditorStore ).getPatternsByBlockTypes( - 'core/post-content' - ) - ); -} - export default function EditorPreferencesModal( { extraSections = {} } ) { const isLargeViewport = useViewportMatch( 'medium' ); const { isActive, showBlockBreadcrumbsOption } = useSelect(