]> Untitled Git - lemmy-ui.git/commitdiff
Use display titles for community links. Fixes #98
authorDessalines <tyhou13@gmx.com>
Sat, 23 Jan 2021 22:23:49 +0000 (17:23 -0500)
committerDessalines <tyhou13@gmx.com>
Sat, 23 Jan 2021 22:23:49 +0000 (17:23 -0500)
src/shared/components/community-link.tsx

index b8f3bc05ec2b963975bc03373b1448cd69298a73..48dd13411d808af8dd140401fb513322967ae6d6 100644 (file)
@@ -20,20 +20,22 @@ export class CommunityLink extends Component<CommunityLinkProps, any> {
 
   render() {
     let community = this.props.community;
-    let name_: string, link: string;
+    let name_: string, title: string, link: string;
     let local = community.local == null ? true : community.local;
     if (local) {
       name_ = community.name;
+      title = community.title;
       link = `/c/${community.name}`;
     } else {
       name_ = `${community.name}@${hostname(community.actor_id)}`;
+      title = `${community.title}@${hostname(community.actor_id)}`;
       link = !this.props.realLink
         ? `/community/${community.id}`
         : community.actor_id;
     }
 
     let apubName = `!${name_}`;
-    let displayName = this.props.useApubName ? apubName : name_;
+    let displayName = this.props.useApubName ? apubName : title;
     return (
       <Link
         title={apubName}