Skip to content

Commit 6f3db75

Browse files
committed
Rename to useHasOtherBlockControls
1 parent 134691e commit 6f3db75

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/block-editor/src/components/block-controls/use-has-block-controls.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import groups from './groups';
1818
* TODO: Remove this hook, as having a toolbar with only a Replace button is a
1919
* misuse of the toolbar.
2020
*/
21-
export function useHasAnyBlockControls() {
21+
export function useHasOtherBlockControls() {
2222
const Slot = groups.other?.Slot;
2323
const fills = useSlotFills( Slot?.__unstableName );
2424
if ( ! Slot ) {

packages/block-editor/src/components/block-toolbar/use-has-block-toolbar.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ import { getBlockType, hasBlockSupport } from '@wordpress/blocks';
77
* Internal dependencies
88
*/
99
import { store as blockEditorStore } from '../../store';
10-
import { useHasAnyBlockControls } from '../block-controls/use-has-block-controls';
10+
import { useHasOtherBlockControls } from '../block-controls/use-has-block-controls';
1111

1212
/**
1313
* Returns true if the block toolbar should be shown.
1414
*
1515
* @return {boolean} Whether the block toolbar component will be rendered.
1616
*/
1717
export function useHasBlockToolbar() {
18-
const hasAnyBlockControls = useHasAnyBlockControls();
18+
const hasAnyBlockControls = useHasOtherBlockControls();
1919
return useSelect(
2020
( select ) => {
2121
const {

0 commit comments

Comments
 (0)