diff --git a/src/shared/components/community-link.tsx b/src/shared/components/community-link.tsx index 5a85a127..c12f570b 100644 --- a/src/shared/components/community-link.tsx +++ b/src/shared/components/community-link.tsx @@ -36,17 +36,34 @@ export class CommunityLink extends Component { let apubName = `!${name_}`; let displayName = this.props.useApubName ? apubName : title; - return ( + return !this.props.realLink ? ( + {this.avatarAndName(displayName)} + + ) : ( + + {this.avatarAndName(displayName)} + + ); + } + + avatarAndName(displayName: string) { + let community = this.props.community; + return ( + <> {!this.props.hideAvatar && community.icon && showAvatars() && ( )} {displayName} - + ); } } diff --git a/src/shared/components/person-listing.tsx b/src/shared/components/person-listing.tsx index fda388df..17265760 100644 --- a/src/shared/components/person-listing.tsx +++ b/src/shared/components/person-listing.tsx @@ -44,19 +44,38 @@ export class PersonListing extends Component { return ( <> - - {!this.props.hideAvatar && person.avatar && showAvatars() && ( - - )} - {displayName} - + {!this.props.realLink ? ( + + {this.avatarAndName(displayName)} + + ) : ( + + {this.avatarAndName(displayName)} + + )} {isCakeDay(person.published) && } ); } + + avatarAndName(displayName: string) { + let person = this.props.person; + return ( + <> + {!this.props.hideAvatar && person.avatar && showAvatars() && ( + + )} + {displayName} + + ); + } }