Skip to content

Commit

Permalink
rename const to showBlocks
Browse files Browse the repository at this point in the history
  • Loading branch information
scruffian committed Feb 24, 2024
1 parent 4642881 commit 25121d0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/block-editor/src/components/inserter/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ function InserterMenu(

const mediaCategories = useMediaCategories( destinationRootClientId );
const showMedia = mediaCategories.length > 0 && ! isZoomOutMode;
const showBlocks = ! isZoomOutMode;

const onInsert = useCallback(
( blocks, meta, shouldForceFocusBlock ) => {
Expand Down Expand Up @@ -252,21 +253,21 @@ function InserterMenu(
__experimentalInsertionIndex
}
showBlockDirectory
showBlocks={ ! isZoomOutMode }
showBlocks={ showBlocks }
shouldFocusBlock={ shouldFocusBlock }
/>
</div>
) }
{ showAsTabs && (
<InserterTabs
showBlocks={ ! isZoomOutMode }
showBlocks={ showBlocks }
showPatterns={ showPatterns }
showMedia={ showMedia }
onSelect={ handleSetSelectedTab }
tabsContents={ inserterTabsContents }
/>
) }
{ ! delayedFilterValue && ! showAsTabs && ! isZoomOutMode && (
{ ! delayedFilterValue && ! showAsTabs && showBlocks && (
<div className="block-editor-inserter__no-tab-container">
{ blocksTab }
</div>
Expand Down

0 comments on commit 25121d0

Please sign in to comment.