From a0215d0ebf6d3839d09f5d24823517234363937c Mon Sep 17 00:00:00 2001 From: George Mamadashvili Date: Wed, 14 Feb 2024 12:14:34 +0400 Subject: [PATCH] Site Editor: Don't memoize the canvas container title --- .../src/components/editor-canvas-container/index.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/packages/edit-site/src/components/editor-canvas-container/index.js b/packages/edit-site/src/components/editor-canvas-container/index.js index a6dc8b05409e22..09ae95989695d8 100644 --- a/packages/edit-site/src/components/editor-canvas-container/index.js +++ b/packages/edit-site/src/components/editor-canvas-container/index.js @@ -1,7 +1,7 @@ /** * WordPress dependencies */ -import { Children, cloneElement, useState, useMemo } from '@wordpress/element'; +import { Children, cloneElement, useState } from '@wordpress/element'; import { Button, privateApis as componentsPrivateApis, @@ -82,10 +82,6 @@ function EditorCanvasContainer( { const focusOnMountRef = useFocusOnMount( 'firstElement' ); const sectionFocusReturnRef = useFocusReturn(); - const title = useMemo( - () => getEditorCanvasContainerTitle( editorCanvasContainerView ), - [ editorCanvasContainerView ] - ); function onCloseContainer() { setIsListViewOpened( showListViewByDefault ); @@ -119,6 +115,7 @@ function EditorCanvasContainer( { return null; } + const title = getEditorCanvasContainerTitle( editorCanvasContainerView ); const shouldShowCloseButton = onClose || closeButtonLabel; return (