1 import { Component } from 'inferno';
2 import { Link } from 'inferno-router';
3 import { UserView } from '../interfaces';
4 import { pictshareAvatarThumbnail, showAvatars, hostname } from '../utils';
8 id?: number; // Necessary if its federated
14 interface UserListingProps {
15 user: UserView | UserOther;
19 export class UserListing extends Component<UserListingProps, any> {
20 constructor(props: any, context: any) {
21 super(props, context);
25 let user = this.props.user;
26 let local = user.local == null ? true : user.local;
27 let name_: string, link: string;
31 link = `/u/${user.name}`;
33 name_ = `${user.name}@${hostname(user.actor_id)}`;
34 link = !this.props.realLink ? `/user/${user.id}` : user.actor_id;
38 <Link className="text-body font-weight-bold" to={link}>
39 {user.avatar && showAvatars() && (
43 src={pictshareAvatarThumbnail(user.avatar)}
44 class="rounded-circle mr-2"