Skip to content

Commit

Permalink
Site Editor: Don't memoize the canvas container title
Browse files Browse the repository at this point in the history
  • Loading branch information
Mamaduka committed Feb 14, 2024
1 parent 4bf1d21 commit a0215d0
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -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,
Expand Down Expand Up @@ -82,10 +82,6 @@ function EditorCanvasContainer( {

const focusOnMountRef = useFocusOnMount( 'firstElement' );
const sectionFocusReturnRef = useFocusReturn();
const title = useMemo(
() => getEditorCanvasContainerTitle( editorCanvasContainerView ),
[ editorCanvasContainerView ]
);

function onCloseContainer() {
setIsListViewOpened( showListViewByDefault );
Expand Down Expand Up @@ -119,6 +115,7 @@ function EditorCanvasContainer( {
return null;
}

const title = getEditorCanvasContainerTitle( editorCanvasContainerView );
const shouldShowCloseButton = onClose || closeButtonLabel;

return (
Expand Down

0 comments on commit a0215d0

Please sign in to comment.