Skip to content

Commit

Permalink
Manual update of route files after #66030
Browse files Browse the repository at this point in the history
  • Loading branch information
ramonjd committed Nov 1, 2024
1 parent 9c8be48 commit df3d341
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ import SidebarButton from '../sidebar-button';
const { useLocation, useHistory } = unlock( routerPrivateApis );

export function SidebarNavigationItemGlobalStyles( props ) {
const { openGeneralSidebar } = useDispatch( editSiteStore );
const history = useHistory();
const { params } = useLocation();
const hasGlobalStyleVariations = useSelect(
( select ) =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,25 @@
*/
import Editor from '../editor';
import SidebarNavigationScreenGlobalStyles from '../sidebar-navigation-screen-global-styles';
import GlobalStylesUIWrapper from '../sidebar-global-styles-wrapper';

export const stylesEditRoute = {
name: 'styles-edit',
match: ( params ) => {
return params.path === '/wp_global_styles' && params.canvas === 'edit';
return (
params.path &&
params.path.startsWith( '/wp_global_styles' ) &&
params.canvas !== 'edit'
);
},
areas: {
content: <GlobalStylesUIWrapper />,
sidebar: <SidebarNavigationScreenGlobalStyles backPath={ {} } />,
preview: <Editor />,
mobile: <Editor />,
preview: <Editor isPreviewOnly />,
mobile: <Editor isPreviewOnly />,
},
widths: {
content: 380,
hasResize: false,
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,25 @@
*/
import Editor from '../editor';
import SidebarNavigationScreenGlobalStyles from '../sidebar-navigation-screen-global-styles';
import GlobalStylesUIWrapper from '../sidebar-global-styles-wrapper';

export const stylesViewRoute = {
name: 'styles-view',
match: ( params ) => {
return params.path === '/wp_global_styles' && params.canvas !== 'edit';
return (
params.path &&
params.path.startsWith( '/wp_global_styles' ) &&
params.canvas !== 'edit'
);
},
areas: {
content: <GlobalStylesUIWrapper />,
sidebar: <SidebarNavigationScreenGlobalStyles backPath={ {} } />,
preview: <Editor />,
preview: <Editor isPreviewOnly />,
mobile: <GlobalStylesUIWrapper />,
},
widths: {
content: 380,
hasResize: false,
},
};

0 comments on commit df3d341

Please sign in to comment.