Skip to content

Commit

Permalink
Remove old page switcher
Browse files Browse the repository at this point in the history
  • Loading branch information
david-szabo97 committed Oct 9, 2020
1 parent 7102dc1 commit f4c819f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 200 deletions.
26 changes: 2 additions & 24 deletions packages/edit-site/src/components/header/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import { Button } from '@wordpress/components';
* Internal dependencies
*/
import MoreMenu from './more-menu';
import PageSwitcher from '../page-switcher';
import SaveButton from '../save-button';
import UndoButton from './undo-redo/undo';
import RedoButton from './undo-redo/redo';
Expand All @@ -35,27 +34,16 @@ export default function Header( {
isNavigationOpen,
onToggleNavigation,
} ) {
const {
deviceType,
hasFixedToolbar,
template,
page,
showOnFront,
} = useSelect( ( select ) => {
const { deviceType, hasFixedToolbar, template } = useSelect( ( select ) => {
const {
__experimentalGetPreviewDeviceType,
isFeatureActive,
getTemplateId,
getTemplatePartId,
getTemplateType,
getPage,
} = select( 'core/edit-site' );

const { getEntityRecord, getEditedEntityRecord } = select( 'core' );
const { show_on_front: _showOnFront } = getEditedEntityRecord(
'root',
'site'
);
const { getEntityRecord } = select( 'core' );

const _templateId = getTemplateId();
return {
Expand All @@ -65,14 +53,11 @@ export default function Header( {
template: getEntityRecord( 'postType', 'wp_template', _templateId ),
templatePartId: getTemplatePartId(),
templateType: getTemplateType(),
page: getPage(),
showOnFront: _showOnFront,
};
}, [] );

const {
__experimentalSetPreviewDeviceType: setPreviewDeviceType,
setPage,
} = useDispatch( 'core/edit-site' );

const isLargeViewport = useViewportMatch( 'medium' );
Expand Down Expand Up @@ -109,13 +94,6 @@ export default function Header( {
<BlockToolbar hideDragHandle />
</div>
) }
<div className="edit-site-header__toolbar-switchers">
<PageSwitcher
showOnFront={ showOnFront }
activePage={ page }
onActivePageChange={ setPage }
/>
</div>
</div>
</div>

Expand Down
156 changes: 0 additions & 156 deletions packages/edit-site/src/components/page-switcher/index.js

This file was deleted.

20 changes: 0 additions & 20 deletions packages/edit-site/src/components/page-switcher/style.scss

This file was deleted.

0 comments on commit f4c819f

Please sign in to comment.