Skip to content

Commit

Permalink
Tidy up useSelect
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewserong committed Sep 14, 2023
1 parent bfc6f26 commit a9fc04d
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions packages/block-editor/src/components/list-view/block.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,11 @@ function ListViewBlock( {
select( blockEditorStore ).getBlockEditingMode( clientId ),
[ clientId ]
);

const { allowRightClickOverrides } = useSelect( ( select ) => {
const { getSettings } = select( blockEditorStore );
return {
allowRightClickOverrides: getSettings().allowRightClickOverrides,
};
} );
const allowRightClickOverrides = useSelect(
( select ) =>
select( blockEditorStore ).getSettings().allowRightClickOverrides,
[]
);

const showBlockActions =
// When a block hides its toolbar it also hides the block settings menu,
Expand Down

0 comments on commit a9fc04d

Please sign in to comment.