From fcf1c65fc131478632525ce44a792f1578932f4a Mon Sep 17 00:00:00 2001
From: Dessalines <tyhou13@gmx.com>
Date: Tue, 14 Apr 2020 19:18:13 -0400
Subject: Front end federation names and links for users, posts, and
 communities.

---
 ui/src/components/main.tsx | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)

(limited to 'ui/src/components/main.tsx')

diff --git a/ui/src/components/main.tsx b/ui/src/components/main.tsx
index 366d3be8..9e0c3a59 100644
--- a/ui/src/components/main.tsx
+++ b/ui/src/components/main.tsx
@@ -34,6 +34,7 @@ import { ListingTypeSelect } from './listing-type-select';
 import { DataTypeSelect } from './data-type-select';
 import { SiteForm } from './site-form';
 import { UserListing } from './user-listing';
+import { CommunityLink } from './community-link';
 import {
   wsJsonToRes,
   repoUrl,
@@ -190,9 +191,14 @@ export class Main extends Component<any, MainState> {
                       <ul class="list-inline">
                         {this.state.subscribedCommunities.map(community => (
                           <li class="list-inline-item">
-                            <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,
+                              }}
+                            />
                           </li>
                         ))}
                       </ul>
@@ -228,7 +234,7 @@ export class Main extends Component<any, MainState> {
         <ul class="list-inline">
           {this.state.trendingCommunities.map(community => (
             <li class="list-inline-item">
-              <Link to={`/c/${community.name}`}>{community.name}</Link>
+              <CommunityLink community={community} />
             </li>
           ))}
         </ul>
@@ -319,6 +325,9 @@ export class Main extends Component<any, MainState> {
                     user={{
                       name: admin.name,
                       avatar: admin.avatar,
+                      local: admin.local,
+                      actor_id: admin.actor_id,
+                      id: admin.id,
                     }}
                   />
                 </li>
-- 
cgit v1.2.3

