1 import { Component } from 'inferno';
2 import { Link } from 'inferno-router';
3 import { UserView } from '../interfaces';
10 import { CakeDay } from './cake-day';
14 id?: number; // Necessary if its federated
21 interface UserListingProps {
22 user: UserView | UserOther;
26 export class UserListing extends Component<UserListingProps, any> {
27 constructor(props: any, context: any) {
28 super(props, context);
32 let user = this.props.user;
33 let local = user.local == null ? true : user.local;
34 let name_: string, link: string;
38 link = `/u/${user.name}`;
40 name_ = `${user.name}@${hostname(user.actor_id)}`;
41 link = !this.props.realLink ? `/user/${user.id}` : user.actor_id;
46 <Link className="text-body font-weight-bold" to={link}>
47 {user.avatar && showAvatars() && (
51 src={pictrsAvatarThumbnail(user.avatar)}
52 class="rounded-circle mr-2"
55 <span>{`/u/${name_}`}</span>
58 {isCakeDay(user.published) && <CakeDay creatorName={name_} />}