diff --git a/packages/editor/src/components/sidebar/index.js b/packages/editor/src/components/sidebar/index.js index dbd33459b7f0f..efca709e0eec7 100644 --- a/packages/editor/src/components/sidebar/index.js +++ b/packages/editor/src/components/sidebar/index.js @@ -51,7 +51,6 @@ const SIDEBAR_ACTIVE_BY_DEFAULT = Platform.select( { const SidebarContent = ( { tabName, keyboardShortcut, - renderingMode, onActionPerformed, extraPanels, } ) => { @@ -112,7 +111,7 @@ const SidebarContent = ( { - + @@ -129,7 +128,7 @@ const SidebarContent = ( { const Sidebar = ( { extraPanels, onActionPerformed } ) => { useAutoSwitchEditorSidebars(); - const { tabName, keyboardShortcut, showSummary, renderingMode } = useSelect( + const { tabName, keyboardShortcut, showSummary } = useSelect( ( select ) => { const shortcut = select( keyboardShortcutsStore @@ -158,7 +157,6 @@ const Sidebar = ( { extraPanels, onActionPerformed } ) => { TEMPLATE_PART_POST_TYPE, NAVIGATION_POST_TYPE, ].includes( select( editorStore ).getCurrentPostType() ), - renderingMode: select( editorStore ).getRenderingMode(), }; }, [] @@ -185,7 +183,6 @@ const Sidebar = ( { extraPanels, onActionPerformed } ) => { tabName={ tabName } keyboardShortcut={ keyboardShortcut } showSummary={ showSummary } - renderingMode={ renderingMode } onActionPerformed={ onActionPerformed } extraPanels={ extraPanels } /> diff --git a/packages/editor/src/components/template-content-panel/index.js b/packages/editor/src/components/template-content-panel/index.js index 14532387ecd05..47d9ab9f2e406 100644 --- a/packages/editor/src/components/template-content-panel/index.js +++ b/packages/editor/src/components/template-content-panel/index.js @@ -27,9 +27,9 @@ const PAGE_CONTENT_BLOCKS = [ const TEMPLATE_PART_BLOCK = 'core/template-part'; -export default function TemplateContentPanel( { renderingMode } ) { +export default function TemplateContentPanel() { const { enableComplementaryArea } = useDispatch( interfaceStore ); - const { clientIds, postType } = useSelect( ( select ) => { + const { clientIds, postType, renderingMode } = useSelect( ( select ) => { const { getBlocksByName } = select( blockEditorStore ); const { getCurrentPostType } = select( editorStore ); const _postType = getCurrentPostType(); @@ -40,6 +40,7 @@ export default function TemplateContentPanel( { renderingMode } ) { ? TEMPLATE_PART_BLOCK : PAGE_CONTENT_BLOCKS ), + renderingMode: select( editorStore ).getRenderingMode(), }; }, [] );