// @flow import React from "react"; import { translate } from "react-i18next"; import type { Me } from "@scm-manager/ui-types"; import { MailLink, AvatarWrapper, AvatarImage } from "@scm-manager/ui-components"; type Props = { me: Me, // Context props t: string => string }; class ProfileInfo extends React.Component { render() { const { me, t } = this.props; return (

{this.renderGroups()}
{t("profile.username")} {me.name}
{t("profile.displayName")} {me.displayName}
{t("profile.mail")}
); } renderGroups() { const { me, t } = this.props; let groups = null; if (me.groups.length > 0) { groups = ( {t("profile.groups")} ); } return groups; } } export default translate("commons")(ProfileInfo);