From 803c373218faf2675890c8f0c67eb2356f1e1f6a Mon Sep 17 00:00:00 2001 From: Riad Benguella Date: Wed, 5 Jun 2024 14:51:40 +0100 Subject: [PATCH] Editor: Only render the site logo once if there's a fill (#62320) --- .../src/components/back-button/index.js | 19 +++++++++++++------ .../src/components/header/back-button.js | 7 ++++++- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/packages/edit-post/src/components/back-button/index.js b/packages/edit-post/src/components/back-button/index.js index ecce4623cea49..04e1b20505176 100644 --- a/packages/edit-post/src/components/back-button/index.js +++ b/packages/edit-post/src/components/back-button/index.js @@ -21,12 +21,19 @@ const slideX = { function BackButton( { initialPost } ) { return ( - - - + { ( { length } ) => + length <= 1 && ( + + + + ) + } ); } diff --git a/packages/editor/src/components/header/back-button.js b/packages/editor/src/components/header/back-button.js index 7b775d11cd7a8..3ac689c841526 100644 --- a/packages/editor/src/components/header/back-button.js +++ b/packages/editor/src/components/header/back-button.js @@ -20,7 +20,12 @@ const BackButtonSlot = ( { children } ) => { return children; } - return ; + return ( + + ); }; BackButton.Slot = BackButtonSlot;