import { Component } from 'inferno'; import { Link } from 'inferno-router'; import { UserView } from '../interfaces'; import { pictshareAvatarThumbnail, showAvatars } from '../utils'; interface UserOther { name: string; avatar?: string; } interface UserListingProps { user: UserView | UserOther; } export class UserListing extends Component { constructor(props: any, context: any) { super(props, context); } render() { let user = this.props.user; return ( {user.avatar && showAvatars() && ( )} {user.name} ); } }