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;
18 export class UserListing extends Component<UserListingProps, any> {
19 constructor(props: any, context: any) {
20 super(props, context);
24 let user = this.props.user;
25 let local = user.local == null ? true : user.local;
26 let name_: string, link: string;
30 link = `/u/${user.name}`;
32 name_ = `${hostname(user.actor_id)}/${user.name}`;
33 link = `/user/${user.id}`;
37 <Link className="text-body font-weight-bold" to={link}>
38 {user.avatar && showAvatars() && (
42 src={pictshareAvatarThumbnail(user.avatar)}
43 class="rounded-circle mr-2"