From f1a7a416dc43bb72a41db680d44f653cd314ff31 Mon Sep 17 00:00:00 2001 From: ntsekouras Date: Mon, 26 Jun 2023 11:02:33 +0300 Subject: [PATCH] add deps --- .../components/inserter-draggable-blocks/index.js | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/packages/block-editor/src/components/inserter-draggable-blocks/index.js b/packages/block-editor/src/components/inserter-draggable-blocks/index.js index cd349243946c2..42cae8c7bcde9 100644 --- a/packages/block-editor/src/components/inserter-draggable-blocks/index.js +++ b/packages/block-editor/src/components/inserter-draggable-blocks/index.js @@ -21,10 +21,15 @@ const InserterDraggableBlocks = ( { blocks, }; - const blockType = useSelect( ( select ) => { - const { getBlockType } = select( blocksStore ); - return blocks.length === 1 && getBlockType( blocks[ 0 ].name ); - } ); + const blockTypeIcon = useSelect( + ( select ) => { + const { getBlockType } = select( blocksStore ); + return ( + blocks.length === 1 && getBlockType( blocks[ 0 ].name )?.icon + ); + }, + [ blocks ] + ); return ( }