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;
interface UserListingProps {
user: UserView | UserOther;
+ realLink?: boolean;
}
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 (
<img
height="32"
width="32"
- src={pictshareAvatarThumbnail(user.avatar)}
+ src={pictrsAvatarThumbnail(user.avatar)}
class="rounded-circle mr-2"
/>
)}