Fixing off-site links for community and user. Fixes #78

This commit is contained in:
Dessalines 2020-11-16 16:39:52 -06:00
parent c98a108ee3
commit e23916208e
2 changed files with 2 additions and 0 deletions

View File

@ -46,6 +46,7 @@ export class CommunityLink extends Component<CommunityLinkProps, any> {
title={apubName} title={apubName}
className={`${this.props.muted ? 'text-muted' : ''}`} className={`${this.props.muted ? 'text-muted' : ''}`}
to={link} to={link}
target={!local ? '_blank' : ''}
> >
{!this.props.hideAvatar && community.icon && showAvatars() && ( {!this.props.hideAvatar && community.icon && showAvatars() && (
<PictrsImage src={community.icon} icon /> <PictrsImage src={community.icon} icon />

View File

@ -53,6 +53,7 @@ export class UserListing extends Component<UserListingProps, any> {
title={apubName} title={apubName}
className={this.props.muted ? 'text-muted' : 'text-info'} className={this.props.muted ? 'text-muted' : 'text-info'}
to={link} to={link}
target={!local ? '_blank' : ''}
> >
{!this.props.hideAvatar && user.avatar && showAvatars() && ( {!this.props.hideAvatar && user.avatar && showAvatars() && (
<PictrsImage src={user.avatar} icon /> <PictrsImage src={user.avatar} icon />