diff --git a/packages/edit-site/src/components/site-hub/index.js b/packages/edit-site/src/components/site-hub/index.js index eadd9bbad68b97..4cface0a9a7dd8 100644 --- a/packages/edit-site/src/components/site-hub/index.js +++ b/packages/edit-site/src/components/site-hub/index.js @@ -19,7 +19,7 @@ import { store as blockEditorStore } from '@wordpress/block-editor'; import { store as coreStore } from '@wordpress/core-data'; import { decodeEntities } from '@wordpress/html-entities'; import { forwardRef } from '@wordpress/element'; -import { search } from '@wordpress/icons'; +import { search, external } from '@wordpress/icons'; import { privateApis as commandsPrivateApis } from '@wordpress/commands'; /** @@ -34,15 +34,20 @@ const { store: commandsStore } = unlock( commandsPrivateApis ); const HUB_ANIMATION_DURATION = 0.3; const SiteHub = forwardRef( ( props, ref ) => { - const { canvasMode, dashboardLink } = useSelect( ( select ) => { + const { canvasMode, dashboardLink, homeUrl } = useSelect( ( select ) => { const { getCanvasMode, getSettings } = unlock( select( editSiteStore ) ); + const { + getUnstableBase, // Site index. + } = select( coreStore ); + return { canvasMode: getCanvasMode(), dashboardLink: getSettings().__experimentalDashboardLink || 'index.php', + homeUrl: getUnstableBase()?.home, }; }, [] ); const { open: openCommandCenter } = useDispatch( commandsStore ); @@ -87,7 +92,11 @@ const SiteHub = forwardRef( ( props, ref ) => { ease: 'easeOut', } } > - + { { decodeEntities( siteTitle ) } +