From d1fbe3397b55590b329074828be3e85ab88abe3a Mon Sep 17 00:00:00 2001 From: Riad Benguella Date: Thu, 23 May 2024 19:23:52 +0100 Subject: [PATCH 1/2] Components: Fix React Warning triggers by the new JSX transform --- .../block-editor/src/components/global-styles/color-panel.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/block-editor/src/components/global-styles/color-panel.js b/packages/block-editor/src/components/global-styles/color-panel.js index baa5a0779cfd0..35ca909448bd5 100644 --- a/packages/block-editor/src/components/global-styles/color-panel.js +++ b/packages/block-editor/src/components/global-styles/color-panel.js @@ -209,7 +209,7 @@ function ColorPanelDropdown( { panelId, } ) { const currentTab = tabs.find( ( tab ) => tab.userValue !== undefined ); - + const { key: firstTabKey, ...firstTab } = tabs[ 0 ] ?? {}; return ( { tabs.length === 1 && ( Date: Fri, 24 May 2024 08:46:30 +0100 Subject: [PATCH 2/2] Fix typo --- .../block-editor/src/components/global-styles/color-panel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/block-editor/src/components/global-styles/color-panel.js b/packages/block-editor/src/components/global-styles/color-panel.js index 35ca909448bd5..04d295a0b0320 100644 --- a/packages/block-editor/src/components/global-styles/color-panel.js +++ b/packages/block-editor/src/components/global-styles/color-panel.js @@ -251,7 +251,7 @@ function ColorPanelDropdown( {
{ tabs.length === 1 && (