Skip to content

Commit

Permalink
Tidy up useSelect
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewserong committed Dec 14, 2023
1 parent 7c23264 commit 007a1ed
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 @@ -90,13 +90,11 @@ function ListViewBlock( {
},
[ 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 007a1ed

Please sign in to comment.