diff options
author | Dessalines <tyhou13@gmx.com> | 2020-04-30 11:45:12 -0400 |
---|---|---|
committer | Dessalines <tyhou13@gmx.com> | 2020-04-30 11:45:12 -0400 |
commit | 38cdfdf7e0ee1db1e315c150a1b375f9245a95db (patch) | |
tree | 83abb732e3ed162dae634009ce43e064b97299a8 /ui/src/components/community-link.tsx | |
parent | ee4f923f60fc732f9d57cebbeeb6879479886291 (diff) |
Changing federated community and user links and searching.
- Search: !community@instance, @user@instance
- Representation: community@instance, user@instance
Diffstat (limited to 'ui/src/components/community-link.tsx')
-rw-r--r-- | ui/src/components/community-link.tsx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ui/src/components/community-link.tsx b/ui/src/components/community-link.tsx index bcfa0534..eb55400e 100644 --- a/ui/src/components/community-link.tsx +++ b/ui/src/components/community-link.tsx @@ -12,6 +12,7 @@ interface CommunityOther { interface CommunityLinkProps { community: Community | CommunityOther; + realLink?: boolean; } export class CommunityLink extends Component<CommunityLinkProps, any> { @@ -27,8 +28,10 @@ export class CommunityLink extends Component<CommunityLinkProps, any> { name_ = community.name; link = `/c/${community.name}`; } else { - name_ = `${hostname(community.actor_id)}/${community.name}`; - link = `/community/${community.id}`; + name_ = `${community.name}@${hostname(community.actor_id)}`; + link = !this.props.realLink + ? `/community/${community.id}` + : community.actor_id; } return <Link to={link}>{name_}</Link>; } |