Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Site Editor: Don't memoize the canvas container title #59000

Merged
merged 1 commit into from
Feb 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading