Skip to content

Commit

Permalink
useBlockInspectorAnimationSettings: Remove unnecessary deps (WordPres…
Browse files Browse the repository at this point in the history
…s#61822)


Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
Co-authored-by: ellatrix <ellatrix@git.wordpress.org>
  • Loading branch information
3 people authored and patil-vipul committed Jun 17, 2024
1 parent a23e3d9 commit 32570ea
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
6 changes: 2 additions & 4 deletions packages/block-editor/src/components/block-inspector/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,8 @@ const BlockInspector = ( { showNoBlockSelectedMessage = true } ) => {
// displays based on the relationship between the selected block
// and its parent, and only enable it if the parent is controlling
// its children blocks.
const blockInspectorAnimationSettings = useBlockInspectorAnimationSettings(
blockType,
selectedBlockClientId
);
const blockInspectorAnimationSettings =
useBlockInspectorAnimationSettings( blockType );

const borderPanelLabel = useBorderPanelLabel( {
blockName: selectedBlockName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ import { useSelect } from '@wordpress/data';
*/
import { store as blockEditorStore } from '../../store';

export default function useBlockInspectorAnimationSettings(
blockType,
selectedBlockClientId
) {
export default function useBlockInspectorAnimationSettings( blockType ) {
return useSelect(
( select ) => {
if ( blockType ) {
Expand Down Expand Up @@ -48,6 +45,6 @@ export default function useBlockInspectorAnimationSettings(
}
return null;
},
[ selectedBlockClientId, blockType ]
[ blockType ]
);
}

0 comments on commit 32570ea

Please sign in to comment.