</li>
{this.props.post.duplicates.map(post => (
<li className="list-inline-item mr-2">
- <Link to={`/post/${post.id}`}>{post.community_name}</Link>
+ <Link to={`/post/${post.id}`}>
+ {post.community_local
+ ? post.community_name
+ : `${post.community_name}@${hostname(
+ post.community_actor_id
+ )}`}
+ </Link>
</li>
))}
</>
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;
<ul class="list-unstyled mb-0">
{this.state.userRes.moderates.map(community => (
<li>
- <Link to={`/c/${community.community_name}`}>
- {community.community_name}
- </Link>
+ <CommunityLink
+ community={{
+ name: community.community_name,
+ id: community.community_id,
+ local: community.community_local,
+ actor_id: community.community_actor_id,
+ icon: community.community_icon,
+ }}
+ />
</li>
))}
</ul>
<ul class="list-unstyled mb-0">
{this.state.userRes.follows.map(community => (
<li>
- <Link to={`/c/${community.community_name}`}>
- {community.community_name}
- </Link>
+ <CommunityLink
+ community={{
+ name: community.community_name,
+ id: community.community_id,
+ local: community.community_local,
+ actor_id: community.community_actor_id,
+ icon: community.community_icon,
+ }}
+ />
</li>
))}
</ul>