import React from 'react'; import { translate } from 'react-i18next'; import { Link } from 'react-router-dom'; import { User } from '@scm-manager/ui-types'; import { Icon } from '@scm-manager/ui-components'; type Props = { user: User; // context props t: (p: string) => string; }; class UserRow extends React.Component { renderLink(to: string, label: string) { return {label}; } render() { const { user, t } = this.props; const to = `/user/${user.name}`; const iconType = user.active ? ( ) : ( ); return ( {iconType} {this.renderLink(to, user.name)} {this.renderLink(to, user.displayName)} {user.mail} ); } } export default translate('users')(UserRow);