Skip to content

Commit

Permalink
Editor: Only render the site logo once if there's a fill (#62320)
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed Jun 5, 2024
1 parent 5a10380 commit 37fa2b5
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 7 deletions.
19 changes: 13 additions & 6 deletions packages/edit-post/src/components/back-button/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,19 @@ const slideX = {
function BackButton( { initialPost } ) {
return (
<BackButtonFill>
<motion.div
variants={ slideX }
transition={ { type: 'tween', delay: 0.8 } }
>
<FullscreenModeClose showTooltip initialPost={ initialPost } />
</motion.div>
{ ( { length } ) =>
length <= 1 && (
<motion.div
variants={ slideX }
transition={ { type: 'tween', delay: 0.8 } }
>
<FullscreenModeClose
showTooltip
initialPost={ initialPost }
/>
</motion.div>
)
}
</BackButtonFill>
);
}
Expand Down
7 changes: 6 additions & 1 deletion packages/editor/src/components/header/back-button.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,12 @@ const BackButtonSlot = ( { children } ) => {
return children;
}

return <Slot bubblesVirtually />;
return (
<Slot
bubblesVirtually
fillProps={ { length: ! fills ? 0 : fills.length } }
/>
);
};
BackButton.Slot = BackButtonSlot;

Expand Down

0 comments on commit 37fa2b5

Please sign in to comment.