Skip to content

Commit

Permalink
Use new selector to get section root
Browse files Browse the repository at this point in the history
  • Loading branch information
getdave committed Sep 4, 2024
1 parent a116c3a commit 32021a3
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 )
Expand Down

0 comments on commit 32021a3

Please sign in to comment.