summaryrefslogtreecommitdiffstats
path: root/ui/src/components/community-link.tsx
diff options
context:
space:
mode:
authorDessalines <tyhou13@gmx.com>2020-05-03 13:22:32 -0400
committerDessalines <tyhou13@gmx.com>2020-05-03 13:22:32 -0400
commit2c22e413eba3b51931af0d9457b6723ad88cf016 (patch)
tree46c31f42610b844775483bf74b4f3b9fe3033858 /ui/src/components/community-link.tsx
parenta09c818746f159bbc7ece19ee263607002dbb6a5 (diff)
parent75c6c8521b2c45e11920ce86a4bc898565e93fbd (diff)
Merge branch 'federation' into federated_remove_actions
Diffstat (limited to 'ui/src/components/community-link.tsx')
-rw-r--r--ui/src/components/community-link.tsx7
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>;
}