From 07ddcb67d41395eff08611669b6416cf7408d8ff Mon Sep 17 00:00:00 2001 From: Marco Ciampini Date: Thu, 5 Dec 2024 12:24:18 +0100 Subject: [PATCH] Remove computedFillProps, use fillProps directly --- .../src/components/inspector-controls/slot.js | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/packages/block-editor/src/components/inspector-controls/slot.js b/packages/block-editor/src/components/inspector-controls/slot.js index 9e37c985e273e..4957ca90b5679 100644 --- a/packages/block-editor/src/components/inspector-controls/slot.js +++ b/packages/block-editor/src/components/inspector-controls/slot.js @@ -2,7 +2,6 @@ * WordPress dependencies */ import { __experimentalUseSlotFills as useSlotFills } from '@wordpress/components'; -import { useMemo } from '@wordpress/element'; import warning from '@wordpress/warning'; import deprecated from '@wordpress/deprecated'; @@ -34,14 +33,6 @@ export default function InspectorControlsSlot( { const slotFill = groups[ group ]; const fills = useSlotFills( slotFill?.name ); - const computedFillProps = useMemo( - () => ( { - ...fillProps, - forwardedContext: [ ...( fillProps?.forwardedContext ?? [] ) ], - } ), - [ fillProps ] - ); - if ( ! slotFill ) { warning( `Unknown InspectorControls group "${ group }" provided.` ); return null; @@ -58,14 +49,12 @@ export default function InspectorControlsSlot( { ); } - return ( - - ); + return ; }