From 7d60169ff4d991f463adb537de9df6abf965854c Mon Sep 17 00:00:00 2001 From: Marco Ciampini Date: Tue, 24 Sep 2024 03:00:16 +0200 Subject: [PATCH] Global styles: do not navigate twice to home screen when opening the sidebar (#65523) * Global styles: do not navigate twice to home screen on sidebar load * Remove whole default block Co-authored-by: ciampo Co-authored-by: ramonjd Co-authored-by: andrewserong --- .../edit-site/src/components/global-styles/ui.js | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/packages/edit-site/src/components/global-styles/ui.js b/packages/edit-site/src/components/global-styles/ui.js index b1c05e3ac75bd2..b1550d2a245131 100644 --- a/packages/edit-site/src/components/global-styles/ui.js +++ b/packages/edit-site/src/components/global-styles/ui.js @@ -271,19 +271,6 @@ function GlobalStylesEditorCanvasContainerLink() { goTo( '/' ); } break; - default: - /* - * Example: the user has navigated to "Browse styles" or elsewhere - * and changes the editorCanvasContainerView, e.g., closes the style book. - * The panel should not be affected. - * Exclude revisions panel from this behavior, - * as it should close when the editorCanvasContainerView doesn't correspond. - */ - if ( path !== '/' && ! isRevisionsOpen ) { - return; - } - goTo( '/' ); - break; } }, [ editorCanvasContainerView, isRevisionsOpen, goTo ] ); }