diff options
author | Dessalines <tyhou13@gmx.com> | 2020-04-14 19:18:13 -0400 |
---|---|---|
committer | Dessalines <tyhou13@gmx.com> | 2020-04-14 19:18:13 -0400 |
commit | fcf1c65fc131478632525ce44a792f1578932f4a (patch) | |
tree | b778be542d06aa374fd5eb9d36b40b2b7fb05536 /ui/src/components/main.tsx | |
parent | 1336b4ed6023e7fcf0fd40be63569966ee4b1b45 (diff) |
Front end federation names and links for users, posts, and communities.
Diffstat (limited to 'ui/src/components/main.tsx')
-rw-r--r-- | ui/src/components/main.tsx | 17 |
1 files changed, 13 insertions, 4 deletions
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> |