Skip to content

Commit

Permalink
Block Editor: No need to unlock public actions (WordPress#66260)
Browse files Browse the repository at this point in the history
Co-authored-by: Mamaduka <[email protected]>
Co-authored-by: youknowriad <[email protected]>
  • Loading branch information
3 people authored Oct 21, 2024
1 parent 3b2b2ed commit 55a7016
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions packages/block-editor/src/components/tool-selector/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import { Icon, edit as editIcon } from '@wordpress/icons';
* Internal dependencies
*/
import { store as blockEditorStore } from '../../store';
import { unlock } from '../../lock-unlock';

const selectIcon = (
<SVG
Expand All @@ -36,9 +35,7 @@ function ToolSelector( props, ref ) {
( select ) => select( blockEditorStore ).__unstableGetEditorMode(),
[]
);
const { __unstableSetEditorMode } = unlock(
useDispatch( blockEditorStore )
);
const { __unstableSetEditorMode } = useDispatch( blockEditorStore );

return (
<Dropdown
Expand Down

0 comments on commit 55a7016

Please sign in to comment.