Skip to content

Commit

Permalink
Only show view site link in view mode (WordPress#51279)
Browse files Browse the repository at this point in the history
  • Loading branch information
glendaviesnz authored and sethrubenstein committed Jul 13, 2023
1 parent 2731db4 commit a494428
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

0 comments on commit a494428

Please sign in to comment.