Skip to content

Commit

Permalink
Remove link from the site title
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed Nov 17, 2022
1 parent b438937 commit 2170f24
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions packages/edit-site/src/components/layout/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,12 @@ export default function Layout() {
const { params } = useLocation();
const isListPage = getIsListPage( params );
const isEditorPage = ! isListPage;
const { canvasMode } = useSelect(
const { canvasMode, dashboardLink } = useSelect(
( select ) => ( {
canvasMode: select( editSiteStore ).__unstableGetCanvasMode(),
dashboardLink:
select( editSiteStore ).getSettings()
.__experimentalDashboardLink,
} ),
[]
);
Expand Down Expand Up @@ -84,7 +87,7 @@ export default function Layout() {
}, [ canvasMode, isMobileViewport ] );
const siteIconButtonProps = isBackToDashboardButton
? {
href: 'index.php',
href: dashboardLink || 'index.php',
'aria-label': __( 'Go back to the dashboard' ),
}
: {
Expand Down Expand Up @@ -132,11 +135,9 @@ export default function Layout() {
>
<HStack>
{ isBackToDashboardButton && (
<Button { ...siteIconButtonProps }>
<SiteIconAndTitle
showIcon={ false }
/>
</Button>
<SiteIconAndTitle
showIcon={ false }
/>
) }

{ showEditButton && (
Expand Down

0 comments on commit 2170f24

Please sign in to comment.