import React from "react"; import { WithTranslation, withTranslation } from "react-i18next"; import { Link } from "react-router-dom"; import { Group } from "@scm-manager/ui-types"; import { Icon } from "@scm-manager/ui-components"; type Props = WithTranslation & { group: Group; }; class GroupRow extends React.Component { renderLink(to: string, label: string) { return {label}; } render() { const { group, t } = this.props; const to = `/group/${group.name}`; const iconType = group.external ? ( ) : ( ); return ( {iconType} {this.renderLink(to, group.name)} {group.description} ); } } export default withTranslation("groups")(GroupRow);