Skip to content

Commit

Permalink
Only show view site link in view mode (#51279)
Browse files Browse the repository at this point in the history
  • Loading branch information
glendaviesnz authored Jun 8, 2023
1 parent 91d3578 commit 3df429f
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions packages/edit-site/src/components/site-hub/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,14 +156,18 @@ const SiteHub = forwardRef( ( props, ref ) => {
{ decodeEntities( siteTitle ) }
</motion.div>
</AnimatePresence>
<Button
href={ homeUrl }
target="_blank"
label={ __( 'View site' ) }
aria-label={ __( 'View site (opens in a new tab)' ) }
icon={ external }
className="edit-site-site-hub__site-view-link"
/>
{ canvasMode === 'view' && (
<Button
href={ homeUrl }
target="_blank"
label={ __( 'View site' ) }
aria-label={ __(
'View site (opens in a new tab)'
) }
icon={ external }
className="edit-site-site-hub__site-view-link"
/>
) }
</HStack>
{ canvasMode === 'view' && (
<Button
Expand Down

1 comment on commit 3df429f

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in 3df429f.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/5206393384
📝 Reported issues:

Please sign in to comment.