Skip to content

Instantly share code, notes, and snippets.

@tofumatt
Last active September 21, 2016 09:58
Show Gist options
  • Save tofumatt/f59a45da713307bcd42855e9f7e0de03 to your computer and use it in GitHub Desktop.
Save tofumatt/f59a45da713307bcd42855e9f7e0de03 to your computer and use it in GitHub Desktop.
render() {
const { result } = this.props;
return (
<li className="SearchResult">
<div>
<img className="SearchResult-icon" src={result.icon_url} alt="Icon" />
</div>
<section className="SearchResult-main">
<h2 className="SearchResult-heading">
<Link to={`/search/addons/${result.slug}`} className="SearchResult-name"
ref={(el) => { this.name = el; }}>
{result.name}
</Link>
</h2>
<div className="SearchResult-info" ref={(el) => { this.guid = el; }}>
{result.guid}
</div>
<span className="SearchResult-info" ref={(el) => { this.type = el; }}>
{result.type}
</span>
<span className="SearchResult-info" ref={(el) => { this.status = el; }}>
{result.status}
</span>
<span className="SearchResult-info" ref={(el) => { this.fileCount = el; }}>
{fileCountText(result.current_version)}
</span>
</section>
<section className="SearchResult-actions">
<ResultLink href={result.url} start>Listing</ResultLink>
<ResultLink href={result.edit_url} middle>Edit</ResultLink>
<ResultLink href={result.review_url} end>Editors</ResultLink>
</section>
</li>
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment