Add image URLs to TabComplete.Entry objects

This commit is contained in:
Kegan Dougal 2015-12-21 17:28:04 +00:00
parent 4e79c3c4c8
commit ba63b5dfff
3 changed files with 19 additions and 5 deletions

View file

@ -30,8 +30,14 @@ module.exports = React.createClass({
return (
<div>
{this.props.entries.map(function(entry, i) {
var image = (
entry.imgUrl ? <img src={entry.imgUrl} /> : null
);
return (
<div key={i + ""}>{entry.text}</div>
<div key={i + ""}>
{image}
{entry.text}
</div>
);
})}
</div>