diff --git a/packages/edit-site/src/components/editor/index.js b/packages/edit-site/src/components/editor/index.js index 9058a163707997..c7481a1d12bd79 100644 --- a/packages/edit-site/src/components/editor/index.js +++ b/packages/edit-site/src/components/editor/index.js @@ -153,9 +153,7 @@ export default function EditSiteEditor( { isPostsList = false } ) { ], [ settings.styles, canvas, currentPostIsTrashed ] ); - const { __unstableSetEditorMode, resetZoomLevel } = unlock( - useDispatch( blockEditorStore ) - ); + const { resetZoomLevel } = unlock( useDispatch( blockEditorStore ) ); const { createSuccessNotice } = useDispatch( noticesStore ); const history = useHistory(); const onActionPerformed = useCallback( @@ -263,9 +261,6 @@ export default function EditSiteEditor( { isPostsList = false } ) { showTooltip tooltipPosition="middle right" onClick={ () => { - __unstableSetEditorMode( - 'edit' - ); resetZoomLevel(); // TODO: this is a temporary solution to navigate to the posts list if we are diff --git a/packages/edit-site/src/components/sync-state-with-url/use-init-edited-entity-from-url.js b/packages/edit-site/src/components/sync-state-with-url/use-init-edited-entity-from-url.js index 9f507693c4cfdc..35eeb5963fb546 100644 --- a/packages/edit-site/src/components/sync-state-with-url/use-init-edited-entity-from-url.js +++ b/packages/edit-site/src/components/sync-state-with-url/use-init-edited-entity-from-url.js @@ -249,15 +249,19 @@ export default function useInitEditedEntityFromURL() { useResolveEditedEntityAndContext( params ); const { setEditedEntity } = useDispatch( editSiteStore ); - const { __unstableSetEditorMode, resetZoomLevel } = unlock( - useDispatch( blockEditorStore ) - ); + const { resetZoomLevel } = unlock( useDispatch( blockEditorStore ) ); useEffect( () => { if ( isReady ) { - __unstableSetEditorMode( 'edit' ); resetZoomLevel(); setEditedEntity( postType, postId, context ); } - }, [ isReady, postType, postId, context, setEditedEntity ] ); + }, [ + isReady, + postType, + postId, + context, + setEditedEntity, + resetZoomLevel, + ] ); }