add links to Licenses in table

This commit is contained in:
Collin M. Barrett 2018-09-29 18:48:47 -05:00
parent 4b60b715d9
commit 11fe35901d

View file

@ -56,9 +56,11 @@ const sortMethod = (a: number, b: number, licenses: ILicense[]) => {
}
};
const Cell = (licenseId: number, licenses: ILicense[]) =>
licenseId
? <div className="fl-tag-container">
{licenses.filter((l: ILicense) => licenseId === l.id)[0].name}
</div>
: null;
const Cell = (licenseId: number, licenses: ILicense[]) => {
const license = licenses.filter((l: ILicense) => licenseId === l.id)[0];
return license
? <div className="fl-tag-container">
{license.descriptionUrl ? <a href={license.descriptionUrl}>{license.name}</a> : license.name}
</div>
: null;
};