Slice Tags

This commit is contained in:
Ian Minoso 2016-12-05 12:50:28 -05:00
parent 4dea516a40
commit 92db3e542c

View file

@ -45,19 +45,19 @@ class repoSidebar extends React.Component<ISidebar, {}> {
return b.lastModified - a.lastModified;
});
for (let i = 0; i < 5; i++){
sortedTags.slice(0,5).forEach(function(el, i){
tagRows.push(
<tr>
<td>
<i className="fa fa-tag rp-imagesTable__tagIcon" aria-hidden="true"></i>
{sortedTags[i].name}
{el.name}
</td>
<td>
{moment(sortedTags[i].lastModified).fromNow()}
{moment(el.lastModified).fromNow()}
</td>
</tr>
);
}
});
return(
<div>