From 72ba66d4c94b877e98eeee9afb10c89d92831e93 Mon Sep 17 00:00:00 2001 From: tellthemachines Date: Mon, 16 Dec 2024 11:46:43 +1100 Subject: [PATCH] Use query instead of path --- .../sidebar-global-styles-wrapper/index.js | 8 ++-- .../components/site-editor-routes/index.js | 2 - .../site-editor-routes/styles-stylebook.js | 40 ------------------- .../components/site-editor-routes/styles.js | 6 ++- 4 files changed, 9 insertions(+), 47 deletions(-) delete mode 100644 packages/edit-site/src/components/site-editor-routes/styles-stylebook.js diff --git a/packages/edit-site/src/components/sidebar-global-styles-wrapper/index.js b/packages/edit-site/src/components/sidebar-global-styles-wrapper/index.js index bc11bf02743777..bfae7fd4c05528 100644 --- a/packages/edit-site/src/components/sidebar-global-styles-wrapper/index.js +++ b/packages/edit-site/src/components/sidebar-global-styles-wrapper/index.js @@ -23,7 +23,7 @@ const GlobalStylesPageActions = ( { setIsStyleBookOpened, path, } ) => { - const stylebookPath = 'styles-stylebook'; + const stylebookPath = addQueryArgs( path, { preview: 'stylebook' } ); const history = useHistory(); return (