]> Untitled Git - lemmy.git/blobdiff - ui/src/components/user-listing.tsx
Merge branch 'master' into federation_merge_from_master_2
[lemmy.git] / ui / src / components / user-listing.tsx
index 356c4d4847797436b96d3794217731383497c2ac..0e150b9420d3468d61cadd01ea229ab2dca01c54 100644 (file)
@@ -1,7 +1,7 @@
 import { Component } from 'inferno';
 import { Link } from 'inferno-router';
 import { UserView } from '../interfaces';
-import { pictshareAvatarThumbnail, showAvatars, hostname } from '../utils';
+import { pictrsAvatarThumbnail, showAvatars, hostname } from '../utils';
 
 interface UserOther {
   name: string;
@@ -13,6 +13,7 @@ interface UserOther {
 
 interface UserListingProps {
   user: UserView | UserOther;
+  realLink?: boolean;
 }
 
 export class UserListing extends Component<UserListingProps, any> {
@@ -29,8 +30,8 @@ export class UserListing extends Component<UserListingProps, any> {
       name_ = user.name;
       link = `/u/${user.name}`;
     } else {
-      name_ = `${hostname(user.actor_id)}/${user.name}`;
-      link = `/user/${user.id}`;
+      name_ = `${user.name}@${hostname(user.actor_id)}`;
+      link = !this.props.realLink ? `/user/${user.id}` : user.actor_id;
     }
 
     return (
@@ -39,7 +40,7 @@ export class UserListing extends Component<UserListingProps, any> {
           <img
             height="32"
             width="32"
-            src={pictshareAvatarThumbnail(user.avatar)}
+            src={pictrsAvatarThumbnail(user.avatar)}
             class="rounded-circle mr-2"
           />
         )}