From 32021a3f43f96924bc83a5910879f98e7163885f Mon Sep 17 00:00:00 2001 From: Dave Smith Date: Wed, 4 Sep 2024 10:16:00 +0100 Subject: [PATCH] Use new selector to get section root --- .../components/provider/content-only-lock-sections.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/editor/src/components/provider/content-only-lock-sections.js b/packages/editor/src/components/provider/content-only-lock-sections.js index 6856e7ae7e1bd6..3e1ed50c2f108c 100644 --- a/packages/editor/src/components/provider/content-only-lock-sections.js +++ b/packages/editor/src/components/provider/content-only-lock-sections.js @@ -9,7 +9,7 @@ import { store as blocksStore } from '@wordpress/blocks'; /** * Internal dependencies */ -import { store as editorStore } from '../../store'; +import { unlock } from '../../lock-unlock'; /** * Component that when rendered, makes it so that the editor allows only @@ -26,9 +26,10 @@ export default function ContentOnlyLockSections() { getBlockOrder, getClientIdsOfDescendants, getClientIdsWithDescendants, - } = select( blockEditorStore ); - const { getEditorSettings } = select( editorStore ); - const { sectionRootClientId } = getEditorSettings(); + getSectionRootClientId, + } = unlock( select( blockEditorStore ) ); + + const sectionRootClientId = getSectionRootClientId(); const sectionClientIds = getBlockOrder( sectionRootClientId ); const allClientIds = sectionRootClientId ? getClientIdsOfDescendants( sectionRootClientId )