Skip to content

Commit

Permalink
Remove unnecessary goTo calls
Browse files Browse the repository at this point in the history
  • Loading branch information
ciampo committed Oct 8, 2024
1 parent 1d52e69 commit 8dc48ba
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,21 +86,17 @@ export default function GlobalStylesSidebar() {
}, [ shouldClearCanvasContainerView ] );

const { setIsListViewOpened } = useDispatch( editorStore );
const { goTo } = useNavigator();

const toggleRevisions = () => {
setIsListViewOpened( false );
if ( isRevisionsStyleBookOpened ) {
goTo( '/' );
setEditorCanvasContainerView( 'style-book' );
return;
}
if ( isRevisionsOpened ) {
goTo( '/' );
setEditorCanvasContainerView( undefined );
return;
}
goTo( '/revisions' );

if ( isStyleBookOpened ) {
setEditorCanvasContainerView(
Expand Down
2 changes: 0 additions & 2 deletions packages/edit-site/src/components/global-styles/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,8 @@ function GlobalStylesActionMenu() {
const { setEditorCanvasContainerView } = unlock(
useDispatch( editSiteStore )
);
const { goTo } = useNavigator();
const loadCustomCSS = () => {
setEditorCanvasContainerView( 'global-styles-css' );
goTo( '/css' );
};

return (
Expand Down

0 comments on commit 8dc48ba

Please sign in to comment.