diff --git a/packages/edit-site/src/components/global-styles/screen-css.js b/packages/edit-site/src/components/global-styles/screen-css.js index 7d67bac28824fe..570ac7abef269d 100644 --- a/packages/edit-site/src/components/global-styles/screen-css.js +++ b/packages/edit-site/src/components/global-styles/screen-css.js @@ -4,11 +4,13 @@ import { __ } from '@wordpress/i18n'; import { ExternalLink } from '@wordpress/components'; import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor'; +import { useDispatch } from '@wordpress/data'; /** * Internal dependencies */ import { unlock } from '../../lock-unlock'; +import { store as editSiteStore } from '../../store'; import ScreenHeader from './header'; const { useGlobalStyle, AdvancedPanel: StylesAdvancedPanel } = unlock( @@ -26,6 +28,10 @@ function ScreenCSS() { shouldDecodeEncode: false, } ); + const { setEditorCanvasContainerView } = unlock( + useDispatch( editSiteStore ) + ); + return ( <> } + onBack={ () => { + setEditorCanvasContainerView( undefined ); + } } />