]> Untitled Git - lemmy-ui.git/commitdiff
Fixing off-site links for community and user. Fixes #78
authorDessalines <tyhou13@gmx.com>
Mon, 16 Nov 2020 22:39:52 +0000 (16:39 -0600)
committerDessalines <tyhou13@gmx.com>
Mon, 16 Nov 2020 22:39:52 +0000 (16:39 -0600)
src/shared/components/community-link.tsx
src/shared/components/user-listing.tsx

index db69f441d674a2d8ce791d8c2f4bf731a133b7e6..0fc92177e40dc351000b7533922d9d65e9e2d2d3 100644 (file)
@@ -46,6 +46,7 @@ export class CommunityLink extends Component<CommunityLinkProps, any> {
         title={apubName}
         className={`${this.props.muted ? 'text-muted' : ''}`}
         to={link}
+        target={!local ? '_blank' : ''}
       >
         {!this.props.hideAvatar && community.icon && showAvatars() && (
           <PictrsImage src={community.icon} icon />
index 1b97dbb25078552f7834827af8f6f0fb3990ca05..18deb5641518d91c147fb52a3a7bde0afa089dc6 100644 (file)
@@ -53,6 +53,7 @@ export class UserListing extends Component<UserListingProps, any> {
           title={apubName}
           className={this.props.muted ? 'text-muted' : 'text-info'}
           to={link}
+          target={!local ? '_blank' : ''}
         >
           {!this.props.hideAvatar && user.avatar && showAvatars() && (
             <PictrsImage src={user.avatar} icon />