diff --git a/packages/block-directory/src/components/downloadable-block-list-item/index.js b/packages/block-directory/src/components/downloadable-block-list-item/index.js index 03e6e79d8928e9..45a2930ad656e3 100644 --- a/packages/block-directory/src/components/downloadable-block-list-item/index.js +++ b/packages/block-directory/src/components/downloadable-block-list-item/index.js @@ -65,7 +65,7 @@ function getDownloadableBlockLabel( ); } -function DownloadableBlockListItem( { composite, item, onClick } ) { +function DownloadableBlockListItem( { item, onClick } ) { const { author, description, icon, rating, title } = item; // getBlockType returns a block object if this block exists, or null if not. const isInstalled = !! getBlockType( item.name ); @@ -116,7 +116,6 @@ function DownloadableBlockListItem( { composite, item, onClick } ) { tooltipPosition="top center" /> } - store={ composite } disabled={ isInstalling || ! isInstallable } >
diff --git a/packages/block-directory/src/components/downloadable-blocks-list/index.js b/packages/block-directory/src/components/downloadable-blocks-list/index.js index 09f509c4ed49c9..3911c3297376db 100644 --- a/packages/block-directory/src/components/downloadable-blocks-list/index.js +++ b/packages/block-directory/src/components/downloadable-blocks-list/index.js @@ -13,12 +13,10 @@ import DownloadableBlockListItem from '../downloadable-block-list-item'; import { store as blockDirectoryStore } from '../../store'; import { unlock } from '../../lock-unlock'; -const { CompositeV2: Composite, useCompositeStoreV2: useCompositeStore } = - unlock( componentsPrivateApis ); +const { CompositeV2: Composite } = unlock( componentsPrivateApis ); const noop = () => {}; function DownloadableBlocksList( { items, onHover = noop, onSelect } ) { - const composite = useCompositeStore(); const { installBlockType } = useDispatch( blockDirectoryStore ); if ( ! items.length ) { @@ -27,7 +25,6 @@ function DownloadableBlocksList( { items, onHover = noop, onSelect } ) { return ( { // Check if the block is registered (`getBlockType` // will return an object). If so, insert the block.