From: Dessalines Date: Mon, 16 Nov 2020 22:19:10 +0000 (-0600) Subject: fixing federated community / cross-post display links. Fixes #75 X-Git-Url: http://these/git/%7B%60/feeds/front/static/%7BpictrsAvatarThumbnail%28this.state.siteRes.site.icon%29%7D?a=commitdiff_plain;h=c98a108ee3f15136d3bf893054259130aaf6f2fa;p=lemmy-ui.git fixing federated community / cross-post display links. Fixes #75 --- diff --git a/src/shared/components/post-listing.tsx b/src/shared/components/post-listing.tsx index 6545b2a..809b8d1 100644 --- a/src/shared/components/post-listing.tsx +++ b/src/shared/components/post-listing.tsx @@ -617,7 +617,13 @@ export class PostListing extends Component { {this.props.post.duplicates.map(post => (
  • - {post.community_name} + + {post.community_local + ? post.community_name + : `${post.community_name}@${hostname( + post.community_actor_id + )}`} +
  • ))} diff --git a/src/shared/components/user.tsx b/src/shared/components/user.tsx index 3c50adf..8f593cc 100644 --- a/src/shared/components/user.tsx +++ b/src/shared/components/user.tsx @@ -55,6 +55,7 @@ import { UserDetails } from './user-details'; import { MarkdownTextArea } from './markdown-textarea'; import { ImageUploadForm } from './image-upload-form'; import { BannerIconHeader } from './banner-icon-header'; +import { CommunityLink } from './community-link'; interface UserState { userRes: UserDetailsResponse; @@ -841,9 +842,15 @@ export class User extends Component {
      {this.state.userRes.moderates.map(community => (
    • - - {community.community_name} - +
    • ))}
    @@ -864,9 +871,15 @@ export class User extends Component {
      {this.state.userRes.follows.map(community => (
    • - - {community.community_name} - +
    • ))}