Skip to content

Commit

Permalink
Remove the redirects to template list from site hub
Browse files Browse the repository at this point in the history
  • Loading branch information
glendaviesnz committed Mar 7, 2023
1 parent d48192b commit 83e1969
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions packages/edit-site/src/components/site-hub/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,17 @@ import { __ } from '@wordpress/i18n';
import { store as blockEditorStore } from '@wordpress/block-editor';
import { store as coreStore } from '@wordpress/core-data';
import { forwardRef } from '@wordpress/element';
import { getQueryArgs } from '@wordpress/url';

/**
* Internal dependencies
*/
import { store as editSiteStore } from '../../store';
import SiteIcon from '../site-icon';
import { unlock } from '../../private-apis';
import { useHistory } from '../routes';

const HUB_ANIMATION_DURATION = 0.3;

const SiteHub = forwardRef( ( props, ref ) => {
const history = useHistory();
const { fromTemplateList } = getQueryArgs( window.location.href );
const { canvasMode, dashboardLink } = useSelect( ( select ) => {
select( editSiteStore ).getEditedPostType();
const { getCanvasMode, getSettings } = unlock(
Expand All @@ -56,14 +52,6 @@ const SiteHub = forwardRef( ( props, ref ) => {
label: __( 'Open Navigation Sidebar' ),
onClick: () => {
clearSelectedBlock();
if ( fromTemplateList ) {
history.push( {
path: '/wp_template/all',
postType: 'wp_template',
postId: undefined,
fromTemplateList: undefined,
} );
}
setCanvasMode( 'view' );
},
};
Expand Down

0 comments on commit 83e1969

Please sign in to comment.